/**
 * Gästebuch Frontend Styles
 * Orientiert sich an Thrive Themes Design-Prinzipien
 */

/* Container */
.gb-container {
    max-width: 100%;
    margin: 0 auto;
    line-height: 1.6;
}

/* Einträge-Anzeige */
.gb-entry-display {
    margin-bottom: 20px;
}

/* Einzelner Eintrag */
.gb-entry {
    padding: 20px;
    margin-bottom: 15px;
    background: #f9f9f9;
    border-radius: 4px;
}


.gb-entry-content {
    position: relative;
}

.gb-entry-header {
    margin-bottom: 8px;
}

.gb-entry-name {
    font-weight: 600;
    color: #333;
    font-size: 1.1em;
}

.gb-entry-date {
    color: #888;
    font-size: 0.9em;
    margin-left: 10px;
}

.gb-entry-date::before {
    content: "–";
    margin-right: 10px;
}

.gb-entry-message {
    color: #555;
    white-space: pre-line;
    word-wrap: break-word;
}

/* Antwort-Bereich */
.gb-reply-toggle {
    margin-top: 12px;
}

.gb-show-reply {
    color: inherit;
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.9em;
}

.gb-show-reply:hover {
    opacity: 0.7;
}

.gb-reply {
    margin-top: 15px;
    padding: 15px;
    background: #fff;
    border-radius: 4px;
    border-left: 3px solid #0073aa;
}

.gb-reply-author {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.gb-reply-text {
    color: #555;
    white-space: pre-line;
    word-wrap: break-word;
}

/* Keine Einträge */
.gb-no-entries {
    padding: 30px;
    text-align: center;
    background: #f5f5f5;
    border-radius: 4px;
    color: #666;
}

/* Aktions-Links */
.gb-actions {
    margin: 20px 0;
    padding-top: 15px;
    border-top: 1px solid #eee;
    text-align: left;
}

.gb-next-entry,
.gb-write-entry-link {
    color: inherit;
    text-decoration: underline;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.gb-next-entry:hover,
.gb-write-entry-link:hover {
    opacity: 0.7;
}

.gb-next-entry.loading {
    opacity: 0.5;
    pointer-events: none;
}

.gb-separator {
    margin: 0 8px;
    color: #888;
}

/* Formular Wrapper */
.gb-form-wrapper {
    margin-top: 20px;
    animation: gbFadeIn 0.3s ease;
}

@keyframes gbFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Formular */
.gb-entry-form {
    background: #fff;
    padding: 25px;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.gb-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.gb-form-header h3 {
    margin: 0;
    font-size: 1.3em;
    color: #333;
}

.gb-form-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s ease;
}

.gb-form-close:hover {
    color: #333;
}

.gb-form-group {
    margin-bottom: 18px;
}

.gb-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
}

.gb-form-group .required {
    color: #dc3545;
}

.gb-input,
.gb-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: inherit;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.gb-input:focus,
.gb-textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.gb-textarea {
    resize: vertical;
    min-height: 120px;
}

/* Honeypot (versteckt) */
.gb-hp-field {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    overflow: hidden;
}

/* Formular Aktionen */
.gb-form-actions {
    margin-top: 20px;
}

.gb-submit-btn {
    display: inline-block;
    padding: 12px 30px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gb-submit-btn:hover {
    background: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.3);
}

.gb-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Formular Nachrichten */
.gb-form-message {
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: 4px;
}

.gb-form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.gb-form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Ladezustand */
.gb-loading {
    position: relative;
    pointer-events: none;
}

.gb-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ddd;
    border-top-color: #0073aa;
    border-radius: 50%;
    animation: gbSpin 0.8s linear infinite;
}

@keyframes gbSpin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 600px) {
    .gb-entry {
        padding: 15px;
    }

    .gb-entry-form {
        padding: 20px 15px;
    }

    .gb-form-header h3 {
        font-size: 1.1em;
    }

    .gb-input,
    .gb-textarea {
        padding: 10px 12px;
    }

    .gb-submit-btn {
        width: 100%;
        text-align: center;
    }
}

/* Thrive Themes Kompatibilität */
.thrv_wrapper .gb-container {
    font-family: inherit;
}

.thrv_wrapper .gb-entry {
    background: inherit;
}

.thrv_wrapper .gb-submit-btn {
    font-family: inherit;
}
