/**
 * File: assets/sec-frontend.css
 * Purpose: Modal, form, button, and CAPTCHA styles for the Safe Email Contact plugin.
 */

/* ================================================================
   Contact link / button
   ================================================================ */

.sec-contact-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s, background 0.2s;
    line-height: 1.4;
}

.sec-contact-link .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    line-height: 18px;
}

/* Styled button variant */
.sec-contact-link.sec-style-button {
    background: var(--sec-btn-bg, #0073aa);
    color: var(--sec-btn-color, #fff);
    padding: 8px 18px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    border: none;
}

.sec-contact-link.sec-style-button,
.sec-contact-link.sec-style-button:visited {
    color: #fff !important;
}

.sec-contact-link.sec-style-button:hover,
.sec-contact-link.sec-style-button:focus {
    opacity: 0.85;
    color: #fff !important;
    text-decoration: none;
}

/* Inline link variant */
.sec-contact-link.sec-style-link {
    color: var(--sec-btn-bg, #0073aa);
    font-weight: inherit;
    font-size: inherit;
    padding: 0;
}

.sec-contact-link.sec-style-link:hover,
.sec-contact-link.sec-style-link:focus {
    text-decoration: underline;
}

/* ================================================================
   Modal overlay + container
   ================================================================ */

.sec-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sec-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.sec-modal-content {
    position: relative;
    background: #fff;
    border-radius: 8px;
    padding: 30px 32px 24px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    animation: secFadeIn 0.2s ease;
}

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

/* Close button */
.sec-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    padding: 0 4px;
    transition: color 0.15s;
}

.sec-modal-close:hover {
    color: #d63638;
}

/* Heading */
.sec-modal-heading {
    margin: 0 0 20px;
    font-size: 20px;
    font-weight: 600;
    color: #1d2327;
    line-height: 1.3;
}

.sec-recipient-name {
    color: var(--sec-btn-bg, #0073aa);
}

/* ================================================================
   Form
   ================================================================ */

.sec-field {
    margin-bottom: 16px;
}

.sec-field label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    color: #1d2327;
}

.sec-required {
    color: #d63638;
}

.sec-field input[type="text"],
.sec-field input[type="email"],
.sec-field input[type="tel"],
.sec-field input[type="number"],
.sec-field textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.15s;
    box-sizing: border-box;
}

.sec-field input:focus,
.sec-field textarea:focus {
    border-color: var(--sec-btn-bg, #0073aa);
    outline: none;
    box-shadow: 0 0 0 1px var(--sec-btn-bg, #0073aa);
}

.sec-field textarea {
    resize: vertical;
    min-height: 100px;
}

/* CAPTCHA row */
.sec-captcha-field {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.sec-captcha-field label {
    flex: 1 1 100%;
}

.sec-captcha-field input[type="number"] {
    width: 100px;
    flex: 0 0 auto;
}

.sec-captcha-reload {
    background: none;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 6px 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    color: #666;
    transition: color 0.15s, border-color 0.15s;
}

.sec-captcha-reload:hover {
    color: var(--sec-btn-bg, #0073aa);
    border-color: var(--sec-btn-bg, #0073aa);
}

.sec-captcha-reload .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 16px;
}

/* Submit */
.sec-submit-field {
    margin-top: 20px;
}

.sec-submit-btn {
    background: var(--sec-btn-bg, #0073aa);
    color: var(--sec-btn-color, #fff);
    border: none;
    padding: 10px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.sec-submit-btn:hover {
    opacity: 0.85;
}

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

/* ================================================================
   Form message (success / error)
   ================================================================ */

.sec-form-message {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.sec-form-message.success {
    background: #edfaef;
    border: 1px solid #46b450;
    color: #1e4620;
}

.sec-form-message.error {
    background: #fcf0f1;
    border: 1px solid #d63638;
    color: #8a1f21;
}

/* ================================================================
   Responsive
   ================================================================ */

@media (max-width: 480px) {
    .sec-modal-content {
        padding: 20px 16px 16px;
        width: 95%;
        border-radius: 6px;
    }

    .sec-modal-heading {
        font-size: 17px;
        padding-right: 30px;
    }

    .sec-submit-btn {
        font-size: 14px;
        padding: 10px 20px;
    }
}

/* END OF FILE: assets/sec-frontend.css */
