/**
 * Send a Hint - Frontend Styles
 * Silvery Jewellery Brand Edition
 * 
 * Brand Colors:
 * - Primary: #AD9F8F (warm taupe)
 * - Secondary: #FFFFFF (white)
 * - CTA/Button: #98ACA3 (sage green)
 * - Background: #FFFFFF
 * - Text: #0a0a0a
 * 
 * Typography: Poppins (Light & Regular)
 * Tone: Warm, sincere, understated elegance
 */

/* Button Styles */
.dah-hint-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    border: 1px solid #AD9F8F;
    background: transparent;
    color: #AD9F8F;
    border-radius: 2px;
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.dah-hint-button:hover {
    background: #AD9F8F;
    color: #FFFFFF;
}

.dah-hint-button .dah-icon {
    display: inline-flex;
    align-items: center;
}

.dah-hint-button .dah-icon svg {
    width: 1em;
    height: 1em;
    stroke-width: 1.5;
}

/* Button Sizes */
.dah-btn-small {
    padding: 8px 16px;
    font-size: 12px;
}

.dah-btn-medium {
    padding: 12px 24px;
    font-size: 13px;
}

.dah-btn-large {
    padding: 16px 32px;
    font-size: 14px;
}

/* Button Wrapper with Label */
.dah-button-wrapper {
    display: inline-flex;
    align-items: center; /* Vertical centering */
}

/* Label positions */
.dah-button-wrapper.dah-label-left,
.dah-button-wrapper.dah-label-right {
    flex-direction: row;
}

.dah-button-wrapper.dah-label-above,
.dah-button-wrapper.dah-label-below {
    flex-direction: column;
    align-items: flex-start; /* Left align for vertical stacking */
}

/* Spacing based on data attribute */
.dah-button-wrapper[data-spacing="4"] { gap: 4px; }
.dah-button-wrapper[data-spacing="6"] { gap: 6px; }
.dah-button-wrapper[data-spacing="8"] { gap: 8px; }
.dah-button-wrapper[data-spacing="10"] { gap: 10px; }
.dah-button-wrapper[data-spacing="12"] { gap: 12px; }
.dah-button-wrapper[data-spacing="16"] { gap: 16px; }
.dah-button-wrapper[data-spacing="20"] { gap: 20px; }
.dah-button-wrapper[data-spacing="24"] { gap: 24px; }

/* Button Label */
.dah-button-label {
    font-size: 14px;
    line-height: 1.5;
}

/* Mobile: Always stack vertically (label on top, button below) */
@media (max-width: 768px) {
    .dah-button-wrapper.dah-label-left,
    .dah-button-wrapper.dah-label-right {
        flex-direction: column;
        align-items: flex-start;
    }
    
    /* Ensure label comes first on mobile for right position */
    .dah-button-wrapper.dah-label-right .dah-button-label {
        order: -1;
    }
}

/* Modal Styles */
.dah-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    font-family: 'Poppins', sans-serif;
}

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

.dah-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.4);
    backdrop-filter: blur(2px);
}

.dah-modal-content {
    position: relative;
    background: #FFFFFF;
    border-radius: 2px;
    max-width: 520px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(10, 10, 10, 0.15);
    animation: dahModalFadeIn 0.4s ease;
}

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

.dah-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #AD9F8F;
    transition: color 0.3s ease;
}

.dah-modal-close:hover {
    color: #0a0a0a;
}

.dah-modal-banner {
    overflow: hidden;
}

.dah-modal-banner img {
    width: 100%;
    display: block;
}

.dah-modal-header {
    padding: 30px 30px 0;
    text-align: center;
}

.dah-modal-header h2 {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    font-weight: 300;
    letter-spacing: 1px;
    color: #0a0a0a;
    line-height: 1.4;
}

/* Subtle decorative line - reflects the brand's elegant simplicity */
.dah-modal-header::after {
    content: '';
    display: block;
    width: 40px;
    height: 1px;
    background: #AD9F8F;
    margin: 15px auto 0;
}

.dah-modal-body {
    padding: 20px 30px 30px;
}

/* Form Styles */
.dah-form {
    position: relative;
}

.dah-form-row {
    margin-bottom: 16px;
}

.dah-form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 540px) {
    .dah-form-row-2 {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

.dah-form-group {
    margin-bottom: 16px;
}

.dah-form-group label {
    display: block;
    margin-bottom: 6px;
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 13px;
    letter-spacing: 0.3px;
    color: #AD9F8F;
}

.dah-form-group label .required {
    color: #AD9F8F;
}

.dah-form-group input,
.dah-form-group select,
.dah-form-group textarea {
    width: 100%;
    padding: 3px 10px;
    border: 1px solid #e5e2df;
    border-radius: 2px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 300;
    color: #0a0a0a !important;
    background: #FFFFFF;
    transition: border-color 0.3s ease;
    -webkit-text-fill-color: #0a0a0a;
    opacity: 1;
}

.dah-form-group input::placeholder,
.dah-form-group textarea::placeholder {
    color: #AD9F8F;
    opacity: 0.6;
}

.dah-form-group input:focus,
.dah-form-group select:focus,
.dah-form-group textarea:focus {
    outline: none;
    border-color: #AD9F8F;
}

.dah-form-group input.error,
.dah-form-group select.error,
.dah-form-group textarea.error {
    border-color: #c9aaaa;
}

.dah-form-group .dah-error {
    display: none;
    color: #b08080;
    font-size: 12px;
    font-weight: 300;
    margin-top: 6px;
}

.dah-form-group input.error + .dah-error,
.dah-form-group select.error + .dah-error,
.dah-form-group textarea.error + .dah-error {
    display: block;
}

.dah-form-group textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

.dah-form-group select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23AD9F8F' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
    color: #0a0a0a;
}

.dah-form-group select option {
    color: #0a0a0a;
    background: #FFFFFF;
    padding: 10px;
}

.dah-form-group select option[value=""] {
    color: #AD9F8F;
}

.dah-char-count {
    display: block;
    text-align: right;
    font-size: 11px;
    font-weight: 300;
    color: #AD9F8F;
    margin-top: 8px;
    letter-spacing: 0.3px;
}

.dah-help-text {
    display: block;
    font-size: 12px;
    font-weight: 300;
    color: #AD9F8F;
    margin-top: 8px;
}

/* Submit Button */
.dah-form-submit {
    margin-top: 20px;
}

.dah-submit-btn {
    width: 100%;
    padding: 16px 32px;
    background: #98ACA3;
    color: #FFFFFF;
    border: none;
    border-radius: 2px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.dah-submit-btn:hover:not(:disabled) {
    background: #889c93;
}

.dah-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.dah-spinner {
    width: 16px;
    height: 16px;
}

/* Messages */
.dah-form-messages {
    margin-top: 24px;
    padding: 16px 20px;
    border-radius: 2px;
    text-align: center;
    font-size: 14px;
    font-weight: 300;
}

.dah-form-messages.success {
    background: #f5f9f7;
    color: #5a7a6d;
    border: 1px solid #98ACA3;
}

.dah-form-messages.error {
    background: #faf6f6;
    color: #8a6060;
    border: 1px solid #d4c4c4;
}

/* Honeypot */
.dah-honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

/* Success State */
.dah-success-state {
    text-align: center;
    padding: 50px 30px;
}

.dah-success-state .dah-success-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 24px;
    background: #f5f9f7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #98ACA3;
}

.dah-success-state .dah-success-icon svg {
    width: 32px;
    height: 32px;
    color: #98ACA3;
    stroke-width: 1.5;
}

.dah-success-state h3 {
    margin: 0 0 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    font-weight: 300;
    letter-spacing: 0.5px;
    color: #0a0a0a;
}

.dah-success-state p {
    color: #AD9F8F;
    margin: 0;
    font-size: 14px;
    font-weight: 300;
    line-height: 1.6;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .dah-modal-content {
        width: 95%;
        margin: 10px;
        max-height: calc(100vh - 20px);
        overflow-y: auto;
    }
    
    .dah-modal-header {
        padding: 20px 20px 0;
    }
    
    .dah-modal-header h2 {
        font-size: 16px;
        line-height: 1.3;
    }
    
    .dah-modal-header::after {
        margin: 12px auto 0;
        width: 30px;
    }
    
    .dah-modal-body {
        padding: 15px 20px 20px;
    }
    
    .dah-form-row {
        margin-bottom: 0;
    }
    
    .dah-form-row-2 {
        gap: 0;
    }
    
    .dah-form-group {
        margin-bottom: 12px;
    }
    
    .dah-form-group label {
        margin-bottom: 4px;
        font-size: 12px;
    }
    
    .dah-form-group input,
    .dah-form-group select,
    .dah-form-group textarea {
        padding: 8px 10px;
        font-size: 14px;
    }
    
    .dah-form-group textarea {
        min-height: 70px;
    }
    
    .dah-char-count {
        margin-top: 4px;
        font-size: 10px;
    }
    
    .dah-help-text {
        margin-top: 4px;
        font-size: 11px;
    }
    
    .dah-form-submit {
        margin-top: 15px;
    }
    
    .dah-submit-btn {
        padding: 12px 24px;
        font-size: 13px;
    }
    
    .dah-modal-close {
        top: 12px;
        right: 12px;
        width: 30px;
        height: 30px;
        font-size: 18px;
    }
    
    .dah-success-state {
        padding: 30px 20px;
    }
    
    .dah-success-state .dah-success-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 15px;
    }
    
    .dah-success-state .dah-success-icon svg {
        width: 24px;
        height: 24px;
    }
    
    .dah-success-state h3 {
        font-size: 16px;
        margin-bottom: 8px;
    }
    
    .dah-success-state p {
        font-size: 13px;
    }
}
