/* MBS Gästebuch - Frontend Styles */

.mbs-gaestebuch-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.mbs-gaestebuch-title {
    font-size: 2em;
    margin-bottom: 30px;
    color: #333;
    text-align: center;
}

/* Button für neuen Eintrag */
.mbs-new-entry-button-wrapper {
    text-align: center;
    margin: 40px 0;
}

.mbs-new-entry-btn {
    background: #2f9d4a;
    color: white;
    border: none;
    padding: 15px 35px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(47, 157, 74, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.mbs-new-entry-btn:hover {
    background: #247a3a;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(47, 157, 74, 0.4);
}

.mbs-new-entry-btn:active {
    transform: translateY(0);
}

.mbs-btn-icon {
    font-size: 20px;
}

.mbs-btn-text {
    font-family: inherit;
}

/* Modal/Popup Styles */
.mbs-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
    animation: fadeIn 0.3s ease;
}

.mbs-modal-overlay.mbs-modal-active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.mbs-modal-container {
    background: white;
    border-radius: 12px;
    width: calc(100% - 20px);
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    position: relative;
    margin: 0 10px;
}

.mbs-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 2px solid #2f9d4a;
    background: #f9f9f9;
    border-radius: 12px 12px 0 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.mbs-modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.5em;
}

.mbs-modal-close {
    background: transparent;
    border: none;
    font-size: 32px;
    color: #666;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.mbs-modal-close:hover {
    background: #2f9d4a;
    color: white;
    transform: rotate(90deg);
}

.mbs-modal-body {
    padding: 25px;
}

.mbs-gaestebuch-form {
    position: relative;
}

.mbs-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

@media (max-width: 600px) {
    .mbs-form-row {
        grid-template-columns: 1fr;
    }
    
    .mbs-new-entry-btn {
        padding: 12px 25px;
        font-size: 16px;
        width: 100%;
        max-width: 300px;
    }
    
    .mbs-modal-overlay {
        padding: 10px;
        align-items: flex-start;
        padding-top: 20px;
    }
    
    .mbs-modal-container {
        max-height: calc(100vh - 40px);
        border-radius: 8px;
        width: calc(100% - 20px);
        margin: 0 10px;
    }
    
    .mbs-modal-header {
        padding: 15px 20px;
    }
    
    .mbs-modal-header h3 {
        font-size: 1.2em;
    }
    
    .mbs-modal-body {
        padding: 20px;
    }
    
    .mbs-gaestebuch-container {
        padding: 15px;
    }
}

.mbs-form-group {
    margin-bottom: 20px;
}

.mbs-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

.mbs-form-group input[type="text"],
.mbs-form-group input[type="url"],
.mbs-form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
}

.mbs-form-group input:focus,
.mbs-form-group textarea:focus {
    outline: none;
    border-color: #2f9d4a;
    box-shadow: 0 0 0 2px rgba(47, 157, 74, 0.1);
}

.mbs-submit-btn {
    background: #2f9d4a;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.mbs-submit-btn:hover {
    background: #247a3a;
}

.mbs-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.mbs-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 4px;
    display: none;
}

.mbs-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.mbs-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.mbs-gaestebuch-entries {
    margin-bottom: 40px;
}

.mbs-gaestebuch-entries h3 {
    margin-bottom: 25px;
    color: #333;
}

.mbs-entry {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-left: 4px solid #2f9d4a;
}

.mbs-entry-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.mbs-entry-name {
    font-size: 1.2em;
    color: #333;
}

.mbs-entry-homepage {
    color: #2f9d4a;
    text-decoration: none;
    font-size: 0.9em;
}

.mbs-entry-homepage:hover {
    text-decoration: underline;
    color: #247a3a;
}

.mbs-entry-location {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.mbs-entry-location-icon {
    font-size: 1em;
}

.mbs-entry-date {
    color: #999;
    font-size: 0.85em;
    margin-bottom: 12px;
}

.mbs-entry-message {
    color: #444;
    line-height: 1.6;
    white-space: pre-wrap;
}

.mbs-no-entries {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

/* Pagination Styles */
.mbs-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.mbs-pagination-link {
    display: inline-block;
    padding: 8px 12px;
    background: #f5f5f5;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
    border: 1px solid #ddd;
    min-width: 40px;
    text-align: center;
}

.mbs-pagination-link:hover {
    background: #2f9d4a;
    color: white;
    border-color: #2f9d4a;
}

.mbs-pagination-current {
    background: #2f9d4a;
    color: white;
    border-color: #2f9d4a;
    font-weight: 600;
}

.mbs-pagination-dots {
    padding: 8px 4px;
    color: #666;
}

.mbs-pagination-prev,
.mbs-pagination-next {
    font-weight: 600;
}

/* Captcha Styles */
.mbs-captcha-group {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.mbs-captcha-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.mbs-captcha-question {
    font-size: 18px;
    font-weight: 600;
    color: #2f9d4a;
    padding: 8px 12px;
    background: #f0f8f2;
    border-radius: 4px;
    min-width: 100px;
    text-align: center;
}

.mbs-captcha-wrapper input[type="text"] {
    flex: 1;
    min-width: 150px;
    max-width: 200px;
}

.mbs-captcha-refresh {
    background: #2f9d4a;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
}

.mbs-captcha-refresh:hover {
    background: #247a3a;
}

.mbs-reload-icon {
    width: 20px;
    height: 20px;
    display: block;
    transition: transform 0.3s ease;
    object-fit: contain;
}

.mbs-captcha-refresh:hover .mbs-reload-icon {
    transform: rotate(180deg);
}

.mbs-captcha-hint {
    display: block;
    margin-top: 8px;
    color: #666;
    font-size: 0.85em;
    font-style: italic;
}

@media (max-width: 600px) {
    .mbs-captcha-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    
    .mbs-captcha-question {
        text-align: center;
    }
    
    .mbs-captcha-wrapper input[type="text"] {
        max-width: 100%;
    }
    
    .mbs-captcha-refresh {
        width: 100%;
    }
}

