/* Location: /www/wwwroot/thaipetmarket.com/platform/modules/Core/Auth/Resources/css/auth-register-page.css */

/**
 * ============================================================================
 * Two-Step Registration Page Styles - Square Photo, Clean Design
 * ============================================================================ */

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background: #ffffff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container */
.auth-container {
    width: 374px;
    margin: 0 auto;
    padding: 20px 0;
}

.auth-card {
    width: 374px;
    background: #ffffff;
    border-radius: 5px;
    padding: 38px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Header - Only on Step 1 */
.auth-header {
    text-align: center;
    margin-bottom: 25px;
}

.auth-header h1 {
    font-size: 22px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

/* Form Steps */
.form-step {
    display: none;
}

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

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

/* Form Elements */
.form-group {
    margin-bottom: 19px;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #333333;
    margin-bottom: 7px;
}

.form-control {
    width: 100%;
    height: 39px;
    padding: 0 13px;
    font-size: 13px;
    color: #1a1a1a;
    background: #ffffff;
    border: 1px solid #d0d0d0;
    border-radius: 3px;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.form-control:focus {
    border: 1px solid #999999;
    outline: none;
}

/* Validation States - Only Red/Green Borders */
.form-control.is-invalid,
.form-control.validation-invalid {
    border: 1px solid #dc3545;
}

.form-control.is-valid {
    border: 1px solid #28a745;
}

.form-control::placeholder {
    color: #999999;
}

/* Textarea */
.form-textarea {
    height: auto;
    padding: 10px 13px;
    resize: vertical;
    font-family: inherit;
}

/* Select */
select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 35px;
}

/* Phone Input */
.phone-input-wrapper {
    display: flex;
    gap: 9px;
}

.phone-country-code {
    width: 68px;
    flex-shrink: 0;
    text-align: center;
    font-weight: 500;
}

.phone-number {
    flex: 1;
}

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

/* Photo Upload - SQUARE with 6px rounded corners */
.photo-upload-container {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border: 1px dashed #d0d0d0;
    border-radius: 3px;
}

.photo-preview-square {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid #d0d0d0;
}

.photo-preview-square img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-upload-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.btn-photo-upload {
    width: 100%;
    height: 32px;
    padding: 0 12px;
    font-size: 12px;
    color: #333333;
    background: #ffffff;
    border: 1px solid #d0d0d0;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-photo-upload:hover {
    background: #f8f9fa;
    border-color: #999999;
}

/* Checkbox */
.form-check {
    margin-bottom: 19px;
    display: flex;
    align-items: flex-start;
    gap: 9px;
}

.form-check-input {
    width: 15px;
    height: 15px;
    margin-top: 2px;
    flex-shrink: 0;
    cursor: pointer;
}

.form-check-label {
    font-size: 12px;
    color: #333333;
    cursor: pointer;
    user-select: none;
    line-height: 1.4;
}

/* Buttons */
.btn {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 13px;
    border-radius: 3px;
}

.btn-primary {
    height: 39px;
    padding: 0 20px;
    background: #0066cc;
    color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
    background: #0052a3;
}

.btn-primary:disabled {
    background: #cccccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-secondary {
    height: 39px;
    padding: 0 20px;
    background: #6c757d;
    color: #ffffff;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-block {
    width: 100%;
}

/* Footer */
.auth-footer {
    text-align: center;
    margin-top: 26px;
    padding-top: 21px;
    border-top: 1px solid #e0e0e0;
}

.auth-footer p {
    font-size: 12px;
    color: #666666;
    margin: 7px 0;
}

/* Links */
.link-primary {
    color: #0066cc;
    text-decoration: none;
    transition: text-decoration 0.2s ease;
}

.link-primary:hover {
    text-decoration: underline;
}

.back-link-container {
    text-align: center;
    margin-bottom: 17px;
}

.back-link {
    color: #666666;
    text-decoration: none;
    font-size: 12px;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: #333333;
}

/* Alerts */
.alert {
    padding: 10px 13px;
    border-radius: 3px;
    margin-bottom: 17px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 9px;
}

.alert-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-danger {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Error Messages - Hidden, only borders shown */
.error-message {
    display: none;
}

/* Camera Modal */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-container {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    animation: modalSlideIn 0.3s ease;
}

.camera-modal {
    max-width: 600px;
}

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

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: #333333;
}

.modal-content {
    padding: 20px;
    text-align: center;
}

#cameraVideo {
    width: 100%;
    max-width: 100%;
    border-radius: 8px;
    background: #000000;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.modal-footer .btn {
    min-width: 100px;
}

/* Response Modal */
.modal-container:not(.camera-modal) .modal-content {
    padding: 26px;
}

#modalIcon {
    font-size: 43px;
    margin-bottom: 17px;
    font-weight: bold;
}

#modalIcon.success {
    color: #48bb78;
}

#modalIcon.error {
    color: #f56565;
}

#modalMessage {
    font-size: 14px;
    color: #333333;
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 480px) {
    .auth-container {
        width: 95%;
        padding: 10px;
    }
    
    .auth-card {
        width: 100%;
        padding: 30px 25px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 19px;
    }
    
    .photo-upload-container {
        flex-direction: column;
        text-align: center;
    }
    
    .modal-container {
        width: 95%;
    }
}
/* ============================================================================
   Toast Notifications
   ============================================================================ */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    min-width: 300px;
    max-width: 400px;
    background: #ffffff;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    padding: 15px;
    gap: 12px;
    pointer-events: all;
    animation: slideInRight 0.3s ease;
    border-left: 4px solid #333;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.hiding {
    animation: slideOutRight 0.3s ease forwards;
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.toast-success {
    border-left-color: #48bb78;
}

.toast-error {
    border-left-color: #f56565;
}

.toast-warning {
    border-left-color: #ed8936;
}

.toast-info {
    border-left-color: #4299e1;
}

.toast-icon {
    font-size: 20px;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.toast-success .toast-icon {
    color: #48bb78;
}

.toast-error .toast-icon {
    color: #f56565;
}

.toast-warning .toast-icon {
    color: #ed8936;
}

.toast-info .toast-icon {
    color: #4299e1;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    color: #333333;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: #999999;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.toast-close:hover {
    color: #333333;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .toast {
        min-width: auto;
        max-width: none;
    }
}