/* Email Access Code Plugin Styles */

.eac-container {
    max-width: 680px;
    margin: 0 auto;
    padding: 20px;
}

.eac-form-wrapper {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 50px 45px;
    width: 100%;
}

.eac-step {
    display: none;
}

.eac-step.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

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

.eac-form-wrapper h3 {
    margin-top: 0;
    margin-bottom: 8px;
    color: #1a1a1a;
    font-size: 28px;
    font-weight: 600;
    text-align: center;
}

.eac-form-wrapper p {
    color: #666;
    text-align: center;
    margin-bottom: 30px;
    font-size: 14px;
    line-height: 1.5;
}

.eac-info {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 10px;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 20px;
}

.eac-form-group {
    margin-bottom: 5px;
}

.eac-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #1a1a1a;
    font-weight: 500;
    font-size: 14px;
}

.eac-form-group input[type="email"],
.eac-form-group input[type="text"] {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.2s;
    box-sizing: border-box;
    background: #ffffff;
}

.eac-form-group input[type="email"]:focus,
.eac-form-group input[type="text"]:focus {
    outline: none;
    border-color: #1e40af;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.eac-button {
    width: 100%;
    padding: 14px 16px;
    background: #041E42;
    color: white;
    border: none;
    border-radius: 200px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 10px;
}

.eac-button:hover {
    background: #A4D65E;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.2);
}

.eac-button:active {
    transform: translateY(0);
}

.eac-button:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

.eac-button-secondary {
    background: #6b7280;
}

.eac-button-secondary:hover {
    background: #4b5563;
}

.eac-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
    display: none;
}

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

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

.eac-message.loading {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
    display: block;
}

.eac-success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: #4CAF50;
    color: white;
    font-size: 48px;
    line-height: 80px;
    text-align: center;
    border-radius: 50%;
    animation: scaleIn 0.5s ease-in-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.eac-redirect-message {
    font-size: 14px;
    color: #666;
}

#eac-countdown {
    font-weight: bold;
    color: #4CAF50;
}

/* Responsividade */
@media (max-width: 600px) {
    .eac-container {
        padding: 20px;
    }
    
    .eac-form-wrapper {
        padding: 35px 25px;
    }
    
    .eac-form-wrapper h3 {
        font-size: 24px;
    }
}

/* Loading spinner */
.eac-loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s ease-in-out infinite;
}

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

/* Toggle Container */
.eac-toggle-container {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
    padding: 10px;
    background: #f9fafb;
    border-radius: 8px;
}

.eac-toggle-option {
    flex: 1;
    text-align: center;
    cursor: pointer;
    position: relative;
}

.eac-toggle-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.eac-toggle-option span {
    display: block;
    padding: 10px 20px;
    border-radius: 6px;
    background: transparent;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.eac-toggle-option input[type="radio"]:checked + span {
    background: #041E42;
    color: white;
}

.eac-toggle-option:hover span {
    background: rgba(4, 30, 66, 0.1);
}

.eac-toggle-option input[type="radio"]:checked + span:hover {
    background: #041E42;
}

/* Form Sections */
.eac-form-section {
    animation: fadeIn 0.3s ease-in;
}

/* Form Rows */
.eac-form-row {
    margin-bottom: 20px;
}

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

/* Textarea */
.eac-form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.2s;
    box-sizing: border-box;
    background: #ffffff;
    font-family: inherit;
    resize: vertical;
}

.eac-form-group textarea:focus {
    outline: none;
    border-color: #1e40af;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

/* Password and Tel inputs */
.eac-form-group input[type="password"],
.eac-form-group input[type="tel"],
.eac-form-group input[type="url"] {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.2s;
    box-sizing: border-box;
    background: #ffffff;
}

.eac-form-group input[type="password"]:focus,
.eac-form-group input[type="tel"]:focus,
.eac-form-group input[type="url"]:focus {
    outline: none;
    border-color: #1e40af;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

/* Small helper text */
.eac-form-group small {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #6b7280;
}

/* Largura maior para cadastro */
.eac-container:has(#eac-register-form-section:not([style*="display: none"])) {
    max-width: 650px;
}

/* Select dropdown */
.eac-form-group select {
    width: 100%;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    font-size: 15px;
    line-height: 1.5;
    transition: all 0.2s;
    box-sizing: border-box;
    background: #ffffff;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    white-space: normal;
    word-wrap: break-word;
}

.eac-form-group select option {
    padding: 10px;
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.5;
}

.eac-form-group select:focus {
    outline: none;
    border-color: #1e40af;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

/* CEP loading indicator */
.eac-loading {
    display: inline-block;
    margin-left: 10px;
    font-size: 12px;
    color: #6b7280;
    font-style: italic;
}

/* Form row with 3 columns */
.eac-form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
}

/* Link "Esqueci meu e-mail" */
.eac-forgot-email {
    text-align: center;
    margin-top: 15px;
    margin-bottom: 0;
}

.eac-forgot-email a {
    color: #041E42;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.eac-forgot-email a:hover {
    color: #1e40af;
    text-decoration: underline;
}

/* Responsividade para cadastro */
@media (max-width: 768px) {
    .eac-form-row-2,
    .eac-form-row-3 {
        grid-template-columns: 1fr;
        gap: 0;
    }
}
