/* assets/css/style.css */

/* Модальное окно */
.cam-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
}

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

.cam-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
}

.cam-modal-content {
    position: relative;
    background-color: #ffffff;
    border-radius: 16px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    animation: camModalSlideIn 0.3s ease-out;
    display: flex;
    flex-direction: column;
}

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

.cam-modal-close {
    position: absolute; top: 24px; right: 24px; width: 40px; height: 40px;
    background: none; border: none; font-size: 28px; cursor: pointer; color: #6c757d;
    transition: all 0.2s; z-index: 10; display: flex; align-items: center; justify-content: center; border-radius: 50%;
}
.cam-modal-close:hover { background-color: #f0f0f0; color: #000; }

/* Основной контейнер и табы */
.cam-main-container,
#cam-verification-form-container,
#cam-reset-password-form-container {
    padding: 40px 60px;
}

.cam-master-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 20px;
    flex-wrap: wrap;
}

.cam-master-tab {
    padding: 10px 20px;
    background: none;
    border: none;
    font-size: 16px;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 8px;
}
.cam-master-tab:hover:not(.active) {
    background-color: #f8f9fa;
    color: #1a1a1a;
}
.cam-master-tab.active {
    color: #ffffff;
    background-color: #1a1a1a;
    font-weight: 600;
}

/* Формы */
.cam-form-container h2 { margin: 0 0 20px 0; font-size: 32px; font-weight: 700; color: #1a1a1a; text-align: center; }
.cam-info-text { margin: -10px auto 30px auto; color: #6c757d; font-size: 15px; line-height: 1.6; text-align: center; max-width: 450px;}
.cam-forms-wrapper form, #cam-verify-code-form, #cam-password-reset-request-form { max-width: 400px; margin: 0 auto; }

/* Элементы формы */
.cam-form-group { margin-bottom: 24px; }
.cam-form-group label { display: block; margin-bottom: 10px; font-size: 15px; color: #1a1a1a; font-weight: 500; }
.cam-form-group input {
    width: 100%; padding: 16px 20px; border: 1px solid #e0e0e0; border-radius: 12px;
    font-size: 16px; transition: all 0.2s; background-color: #f8f9fa;
}
.cam-form-group input:focus { outline: none; border-color: #1a1a1a; background-color: #ffffff; box-shadow: 0 0 0 4px rgba(26, 26, 26, 0.1); }
.cam-phone-input { display: flex; align-items: center; border: 1px solid #e0e0e0; border-radius: 12px; overflow: hidden; background-color: #f8f9fa; }
.cam-phone-input:focus-within { border-color: #1a1a1a; background-color: #ffffff; box-shadow: 0 0 0 4px rgba(26, 26, 26, 0.1); }
.cam-country-code { padding: 16px 20px; border-right: 1px solid #e0e0e0; font-size: 16px; color: #1a1a1a; white-space: nowrap; }
.cam-phone-input input { flex: 1; border: none; background: transparent; padding-left: 0; padding-right: 0; }
.cam-phone-input input:focus { box-shadow: none; }

/* Форма верификации */
#cam-verification-form-container, #cam-reset-password-form-container { text-align: center; }
.cam-verification-message { margin-bottom: 40px; }

#cam-verify-code-form input[name="code"] {
    text-align: center; font-size: 36px; letter-spacing: 16px; max-width: 320px; margin: 0 auto 32px;
}

.cam-submit-button {
    width: 100%; padding: 18px; background-color: #1a1a1a; color: #ffffff; border: none; border-radius: 12px;
    font-size: 16px; font-weight: 600; cursor: pointer; transition: all 0.2s; display: flex; align-items: center;
    justify-content: center; gap: 8px; margin-top: 16px;
}
.cam-submit-button:hover { background-color: #000000; transform: translateY(-1px); }
.cam-submit-button:disabled { background-color: #6c757d; cursor: not-allowed; transform: none; }
.cam-submit-button.loading::after {
    content: ''; width: 16px; height: 16px; border: 2px solid #ffffff; border-top-color: transparent;
    border-radius: 50%; animation: camSpinner 0.8s linear infinite;
}
@keyframes camSpinner { to { transform: rotate(360deg); } }

/* Футер */
.cam-form-footer { margin-top: 32px; text-align: center; font-size: 15px; color: #6c757d; }
.cam-form-footer a { color: #1a1a1a; text-decoration: none; font-weight: 600; }
.cam-form-footer a:hover { text-decoration: underline; }
.cam-form-footer .cam-back-to-main { display: inline-block; margin-top: 15px; }
#cam-resend-code.disabled { color: #6c757d; cursor: not-allowed; text-decoration: none; }

/* Сообщения */
.cam-error-message, .cam-success-message {
    padding: 14px 18px; border-radius: 8px; margin-bottom: 24px; font-size: 14px;
}
.cam-error-message { background-color: #fee; color: #c33; border: 1px solid #fcc; }
.cam-success-message { background-color: #e7f5e7; color: #2e7d2e; border: 1px solid #c3e6c3; }

/* Адаптивность */
@media (max-width: 768px) {
    .cam-modal-content { width: 100%; height: 100%; max-width: none; max-height: none; border-radius: 0; }
    .cam-main-container, #cam-verification-form-container, #cam-reset-password-form-container {
        padding: 30px 20px; height: 100vh; overflow-y: auto;
    }
    .cam-master-tabs { gap: 5px; }
    .cam-master-tab { font-size: 14px; padding: 8px 12px; }
    .cam-form-container h2 { font-size: 24px; }
}