/**
 * Common UI Framework Styles
 * 
 * Shared styles for consistent UI across signup and my-account pages.
 * Follows DRY principles - all common styles defined once.
 */

/* ============================================
   CONTAINER & LAYOUT
   ============================================ */
.account-dashboard {
    margin: 0 auto;
    max-width: 900px;
}

.account-dashboard.fixed-header {
    padding-top: 0;
}

/* ============================================
   HEADER SECTION
   ============================================ */
.account-header {
    background: linear-gradient(135deg, #28a616, #21b50c);
    color: white;
    padding: 30px;
    margin-bottom: 30px;
    text-align: center;
    border-top: solid 3px;
}

.account-header h1 {
    margin: 0;
    font-size: 2.5em;
    color: white;
    font-weight: bold;
}

.account-header .subtitle {
    font-size: 1.2em;
    opacity: 0.9;
    margin-top: 10px;
}

/* ============================================
   FORM SECTIONS
   ============================================ */
.account-section {
    margin-bottom: 40px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #28a616;
}

.account-section h3 {
    color: #28a616;
    margin-top: 0;
    margin-bottom: 20px;
    font-weight: 600;
}

.account-section .form-group {
    margin-bottom: 20px;
}

.account-section label {
    display: block;
    font-weight: 600;
    color: #495057;
    margin-bottom: 5px;
}

/* ============================================
   FORM INPUTS (Shared across both pages)
   ============================================ */
.textboxSS,
.account-section input[type="text"],
.account-section input[type="email"],
.account-section input[type="password"],
.account-section input[type="number"] {
    border-radius: 10px;
    border: 1px solid #C2C2C2;
    padding: 10px 12px;
    box-shadow: 0 0 3px 0 #CFCFCF;
    color: #000000;
    font-size: 14px;
    height: 38px;
    margin-top: 5px;
    width: 100%;
    font-family: "Roboto", sans-serif;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.textboxSS:focus,
.account-section input:focus {
    box-shadow: 0 0 3px 0 #28a616;
    border: 1px solid #28a616;
    outline: 0;
}

.reg_common_inp,
.account-section select {
    border-radius: 10px;
    border: 1px solid #C2C2C2;
    box-shadow: 0 0 3px 0 #CFCFCF;
    color: #000000;
    font-size: 14px;
    height: 38px;
    padding: 7px 12px;
    width: 100%;
    margin-top: 5px;
    font-family: "Roboto", sans-serif;
    background-color: white;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.reg_common_inp:focus,
.account-section select:focus {
    box-shadow: 0 0 3px 0 #28a616;
    border: 1px solid #28a616;
    outline: 0;
}

/* Form Control compatibility (Bootstrap classes used in my-account) */
.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #C2C2C2;
    border-radius: 10px;
    font-size: 14px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    box-shadow: 0 0 3px 0 #28a616;
    border: 1px solid #28a616;
    outline: 0;
}

/* ============================================
   FIELD VALIDATION & ERRORS
   ============================================ */
.required {
    color: #d9534f;
}

.field-error {
    color: #d9534f;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.field-error.show {
    display: block;
}

.textboxSS.error,
.reg_common_inp.error,
.form-control.error,
.account-section input.error,
.account-section select.error {
    border-color: #d9534f;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.textboxSS.success,
.reg_common_inp.success,
.form-control.success {
    border-color: #28a616;
    box-shadow: 0 0 0 0.2rem rgba(40, 166, 22, 0.25);
}

.form-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
}

.form-success {
    color: #28a616;
    font-size: 12px;
    margin-top: 5px;
}

/* ============================================
   BUTTONS
   ============================================ */
.account-btn {
    background: linear-gradient(135deg, #28a616, #21b50c);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    margin-right: 10px;
    margin-bottom: 10px;
    font-size: 14px;
}

.account-btn:hover {
    background: linear-gradient(135deg, #21b50c, #1a8c0a);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.account-btn:active {
    transform: translateY(0);
}

.account-btn-secondary {
    background: #6c757d;
}

.account-btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.account-btn-danger {
    background: #dc3545;
}

.account-btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* ============================================
   FORM ACTIONS
   ============================================ */
.form-actions {
    margin-top: 30px;
    text-align: center;
}

/* ============================================
   CHECKBOX LABELS
   ============================================ */
.newsletter-checkbox-label,
.checkbox-label {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    cursor: pointer;
    font-weight: normal;
    margin: 0;
    padding: 0;
}

.newsletter-checkbox-label input[type="checkbox"],
.checkbox-label input[type="checkbox"] {
    margin: 0 !important;
    flex-shrink: 0;
    order: -1;
    width: auto;
    height: auto;
}

.newsletter-checkbox-label span,
.checkbox-label span {
    flex: 0 1 auto;
}

/* ============================================
   NOTIFICATIONS
   ============================================ */
.account-notification {
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.account-notification.success {
    background-color: #d4edda;
    border-color: #28a616;
    color: #155724;
}

.account-notification.error {
    background-color: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.account-notification.warning {
    background-color: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.account-notification.info {
    background-color: #d1ecf1;
    border-color: #17a2b8;
    color: #0c5460;
}

/* ============================================
   LOADING OVERLAY
   ============================================ */
.loading-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading {
    background: white;
    padding: 20px 40px;
    border-radius: 8px;
    font-weight: 600;
    color: #28a616;
    text-align: center;
}

/* ============================================
   SIGNUP PAGE SPECIFIC
   ============================================ */
.signup-step {
    max-width: 900px;
    margin: 0 auto;
}

/* ============================================
   RESPONSIVE DESIGN (Mobile-First)
   ============================================ */
@media (max-width: 768px) {
    .account-dashboard {
        padding: 15px;
    }

    .account-header {
        padding: 20px;
    }

    .account-header h1 {
        font-size: 2em;
    }

    .account-section {
        padding: 15px;
        margin-bottom: 20px;
    }

    .account-btn {
        width: 100%;
        margin-bottom: 10px;
        text-align: center;
    }

    .form-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .form-actions .account-btn {
        width: 100%;
        margin-right: 0;
    }
}

