/*
 * Treespot Widerrufsbutton - Frontend Styles
 * Matches treespot.at: warm, natural, wood-themed aesthetic
 */

.treespot-widerruf-wrapper {
    max-width: 640px;
    margin: 2em auto;
    padding: 2em;
    background: #fafaf7;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    font-family: inherit;
}

.treespot-widerruf-intro {
    margin-bottom: 1.5em;
    color: #4a4a4a;
    line-height: 1.6;
}

.treespot-widerruf-form h3 {
    margin-top: 0;
    margin-bottom: 1em;
    font-size: 1.15em;
    color: #2c2c2c;
    border-bottom: 2px solid #c8b89a;
    padding-bottom: 0.5em;
}

.treespot-widerruf-row {
    margin-bottom: 1.25em;
}

.treespot-widerruf-row label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4em;
    color: #2c2c2c;
}

.treespot-widerruf-row .required {
    color: #b54545;
}

.treespot-widerruf-row input[type="text"],
.treespot-widerruf-row input[type="email"],
.treespot-widerruf-row input[type="date"],
.treespot-widerruf-row textarea {
    width: 100%;
    padding: 0.65em 0.85em;
    border: 1px solid #d4cfc4;
    border-radius: 6px;
    font-size: 1em;
    font-family: inherit;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.15s ease;
}

.treespot-widerruf-row input:focus,
.treespot-widerruf-row textarea:focus {
    outline: none;
    border-color: #8a7a5e;
    box-shadow: 0 0 0 3px rgba(138, 122, 94, 0.15);
}

.treespot-widerruf-row small {
    display: block;
    margin-top: 0.4em;
    font-size: 0.85em;
    color: #777;
}

/* Honeypot - hidden but accessible to bots */
.treespot-widerruf-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Step 2: Confirmation summary */
.treespot-widerruf-confirm-text {
    padding: 1em;
    background: #fff8e8;
    border-left: 4px solid #d4a64a;
    border-radius: 4px;
    margin-bottom: 1.25em;
}

.treespot-widerruf-summary {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 6px;
    padding: 1em 1.25em;
    margin-bottom: 1.5em;
    display: grid;
    grid-template-columns: 35% 65%;
    gap: 0.5em 1em;
}

.treespot-widerruf-summary dt {
    font-weight: 600;
    color: #555;
}

.treespot-widerruf-summary dd {
    margin: 0;
    color: #2c2c2c;
    word-break: break-word;
}

.treespot-widerruf-confirm-checkbox {
    background: #fff;
    border: 2px solid #c8b89a;
    border-radius: 6px;
    padding: 1em;
    margin-bottom: 1.5em;
}

.treespot-widerruf-confirm-checkbox label {
    display: flex;
    gap: 0.6em;
    align-items: flex-start;
    cursor: pointer;
    font-weight: 500;
}

.treespot-widerruf-confirm-checkbox input[type="checkbox"] {
    margin-top: 0.25em;
    transform: scale(1.2);
}

/* Action buttons */
.treespot-widerruf-actions {
    display: flex;
    gap: 1em;
    flex-wrap: wrap;
    margin-top: 1.5em;
}

.treespot-widerruf-form button {
    padding: 0.85em 1.6em;
    font-size: 1em;
    font-family: inherit;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.treespot-widerruf-next-btn,
.treespot-widerruf-submit-btn {
    background: #2c2c2c;
    color: #fff;
}

.treespot-widerruf-next-btn:hover,
.treespot-widerruf-submit-btn:hover {
    background: #1a1a1a;
    transform: translateY(-1px);
}

.treespot-widerruf-submit-btn {
    background: #7a8c5e;
}

.treespot-widerruf-submit-btn:hover {
    background: #5e6f48;
}

.treespot-widerruf-back-btn {
    background: #f0ece4;
    color: #2c2c2c;
}

.treespot-widerruf-back-btn:hover {
    background: #e4dfd2;
}

/* Error / Success */
.treespot-widerruf-error {
    max-width: 640px;
    margin: 1.5em auto;
    padding: 1em 1.25em;
    background: #fbeaea;
    border-left: 4px solid #b54545;
    border-radius: 4px;
    color: #7a2c2c;
}

.treespot-widerruf-success {
    max-width: 640px;
    margin: 2em auto;
    padding: 2em;
    background: #f0f5e8;
    border: 1px solid #c8d4a8;
    border-radius: 12px;
}

.treespot-widerruf-success h2 {
    margin-top: 0;
    color: #4a5e2a;
}

.treespot-widerruf-success code {
    background: #fff;
    padding: 0.2em 0.5em;
    border-radius: 4px;
    border: 1px solid #d4dcc4;
    font-size: 1.1em;
    font-weight: 600;
}

.treespot-widerruf-print-btn {
    padding: 0.6em 1.2em;
    background: #fff;
    border: 1px solid #c8d4a8;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95em;
}

.treespot-widerruf-print-btn:hover {
    background: #f8faf2;
}

.treespot-widerruf-alt {
    margin-top: 1em;
    text-align: center;
    color: #888;
}

/* Standalone button (shortcode) */
.treespot-widerruf-btn {
    display: inline-block;
    padding: 0.7em 1.4em;
    background: #2c2c2c;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.15s ease;
}

.treespot-widerruf-btn:hover {
    background: #1a1a1a;
    transform: translateY(-1px);
    color: #fff !important;
}

/* Floating button */
.treespot-widerruf-floating {
    position: fixed;
    bottom: 1.25em;
    left: 1.25em;
    z-index: 9998;
    padding: 0.7em 1.2em;
    background: #2c2c2c;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.15s ease;
}

.treespot-widerruf-floating:hover {
    background: #1a1a1a;
    transform: translateY(-2px);
    color: #fff !important;
}

/* Mobile */
@media (max-width: 640px) {
    .treespot-widerruf-wrapper {
        padding: 1.25em;
        margin: 1em;
    }

    .treespot-widerruf-summary {
        grid-template-columns: 1fr;
        gap: 0.2em 0;
    }

    .treespot-widerruf-summary dt {
        margin-top: 0.5em;
    }

    .treespot-widerruf-actions {
        flex-direction: column;
    }

    .treespot-widerruf-form button {
        width: 100%;
    }

    .treespot-widerruf-floating {
        bottom: 0.75em;
        left: 0.75em;
        font-size: 0.85em;
        padding: 0.6em 1em;
    }
}

/* Print: only success page */
@media print {
    body * { visibility: hidden; }
    .treespot-widerruf-success,
    .treespot-widerruf-success * { visibility: visible; }
    .treespot-widerruf-success {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        border: none;
        background: #fff;
    }
    .treespot-widerruf-print { display: none; }
}
