/* =========================================
   MSR – Multi-Step Registration Form
   Professional Frontend Styles v2.0
   ========================================= */

/* ---- Reset & Base ---- */
.msr-form {
    max-width: 900px;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.msr-form *,
.msr-form *::before,
.msr-form *::after {
    box-sizing: border-box;
}

/* ---- Steps ---- */
.msr-step {
    display: none;
    animation: msrFadeIn 0.5s ease;
}
.msr-step.active {
    display: block;
}

/* ---- Step Indicators ---- */
.msr-step-indicators {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
    padding: 0 20px;
}

.msr-step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.msr-step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s ease;
}

.msr-step-label {
    margin-top: 8px;
    font-size: 12px;
    color: #666;
    font-weight: 500;
    transition: all 0.3s ease;
}

.msr-step-indicator.active .msr-step-number {
    background: #4CAF50;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(76, 175, 80, 0.4);
}
.msr-step-indicator.active .msr-step-label {
    color: #4CAF50;
    font-weight: 600;
}

.msr-step-indicator.completed .msr-step-number {
    background: #28a745;
    color: white;
}
.msr-step-indicator.completed .msr-step-label {
    color: #28a745;
}

.msr-step-line {
    width: 80px;
    height: 3px;
    background: #e0e0e0;
    margin: 0 10px;
    margin-bottom: 25px;
    transition: all 0.3s ease;
}
.msr-step-line.active {
    background: #4CAF50;
}

/* ---- Progress Bar ---- */
.msr-progress {
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    margin-bottom: 30px;
    overflow: hidden;
}
.msr-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    transition: width 0.3s ease;
    width: 0;
}

/* ---- Notification ---- */
.msr-notification {
    padding: 18px 25px;
    border-radius: 12px;
    display: none;
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    min-width: 350px;
    max-width: 90%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    font-weight: 500;
    font-size: 15px;
    animation: msrSlideDown 0.3s ease;
}
.msr-notification.success {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
}
.msr-notification.error {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}
.msr-notification.show {
    display: block;
}

/* ---- Pack Display Banner ---- */
.msr-pack-display {
    background: #131313;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    border: 2px solid #4CAF50;
}
.msr-pack-display p {
    margin: 0;
    font-weight: 900;
    color: #fff;
}

/* ---- Step Title ---- */
.msr-step-title {
    font-size: 24px;
    margin-bottom: 10px;
    color: #000;
    font-weight: 600;
}
.msr-step-subtitle {
    color: #666;
    margin-bottom: 25px;
    font-size: 14px;
}

/* ---- Section Title ---- */
.msr-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #4CAF50;
    margin: 25px 0 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #4CAF50;
}

/* ---- Form Group ---- */
.msr-form-group {
    margin-bottom: 20px;
}
.msr-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}
.msr-form-group input,
.msr-form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    box-sizing: border-box;
    color: #636363;
    background-color: #f8f9fa;
}
.msr-form-group input:focus,
.msr-form-group select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.msr-required {
    color: #e74c3c;
    font-weight: bold;
}

/* Error state */
.msr-error-field {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.3) !important;
    background-color: #fdf2f2 !important;
}

/* ---- Inline Fields (grid) ---- */
.msr-inline-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* ---- Dynamic Fields ---- */
.msr-dynamic-fields {
    display: none;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 15px;
    border: 1px solid #e9ecef;
}
.msr-dynamic-fields.show {
    display: block;
    animation: msrFadeIn 0.3s ease;
}

/* ---- Associate Block ---- */
.msr-associate-block {
    background: #fff;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    border: 1px solid #e9ecef;
}
.msr-associate-block h4 {
    margin: 0 0 15px;
    color: #666;
    font-size: 14px;
}

/* ---- Upload Field ---- */
.msr-upload-field {
    border: 2px dashed #ddd;
    padding: 20px;
    text-align: center;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    background: #fafafa;
}
.msr-upload-field:hover {
    border-color: #4CAF50;
    background: #f0f9f0;
}
.msr-upload-field input[type="file"] {
    display: none;
}
.msr-upload-label {
    color: #636363;
    font-size: 13px;
}
.msr-file-name {
    margin-top: 8px;
    font-size: 12px;
    color: #4CAF50;
    font-weight: 600;
}

/* ---- Buttons ---- */
.msr-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    gap: 10px;
}
.msr-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    flex: 1;
}
.msr-btn-primary {
    background: #4CAF50;
    color: white;
}
.msr-btn-primary:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}
.msr-btn-secondary {
    background: #6c757d;
    color: white;
}
.msr-btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}
.msr-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}
.msr-btn-primary:disabled {
    background: #ccc !important;
}

/* ---- Confirmation Summary ---- */
.msr-confirmation-container {
    max-width: 800px;
    margin: 0 auto;
}

.msr-summary-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 25px;
    border: 1px solid #e8e8e8;
    animation: msrSlideInUp 0.5s ease forwards;
}
.msr-summary-card:nth-child(2) { animation-delay: 0.1s; }
.msr-summary-card:nth-child(3) { animation-delay: 0.2s; }

.msr-summary-card-header {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    padding: 20px 25px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.msr-summary-card-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}
.msr-summary-card-header .msr-header-icon {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.msr-summary-card-body {
    padding: 25px;
}

.msr-info-section {
    margin-bottom: 25px;
}
.msr-info-section:last-child {
    margin-bottom: 0;
}
.msr-info-section-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #4CAF50;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e8f5e9;
    display: flex;
    align-items: center;
    gap: 8px;
}
.msr-info-section-title::before {
    content: '';
    width: 4px;
    height: 16px;
    background: #4CAF50;
    border-radius: 2px;
}

.msr-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
}
.msr-info-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    border-left: 3px solid #4CAF50;
    transition: all 0.3s ease;
    animation: msrSlideInUp 0.4s ease forwards;
    opacity: 0;
}
.msr-info-item:nth-child(1) { animation-delay: 0.1s; }
.msr-info-item:nth-child(2) { animation-delay: 0.15s; }
.msr-info-item:nth-child(3) { animation-delay: 0.2s; }
.msr-info-item:nth-child(4) { animation-delay: 0.25s; }
.msr-info-item:nth-child(5) { animation-delay: 0.3s; }
.msr-info-item:nth-child(6) { animation-delay: 0.35s; }

.msr-info-item:hover {
    background: #e8f5e9;
    transform: translateX(3px);
}
.msr-info-item.full-width {
    grid-column: 1 / -1;
}
.msr-info-label {
    font-size: 12px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 5px;
}
.msr-info-value {
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
}
.msr-info-value.highlight { color: #4CAF50; font-size: 16px; }
.msr-info-value.price { color: #27ae60; font-size: 18px; font-weight: 700; }

/* List Items */
.msr-list-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.msr-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 14px;
    color: #555;
    border-left: 3px solid #ddd;
    transition: all 0.3s ease;
}
.msr-list-item:hover {
    background: #e8f5e9;
    border-left-color: #4CAF50;
}
.msr-list-item-number {
    width: 24px;
    height: 24px;
    background: #4CAF50;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}
.msr-list-item-value {
    font-weight: 600;
    color: #333;
}

/* Pack Badge */
.msr-pack-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

/* Summary Total */
.msr-summary-total {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    padding: 20px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    border: 2px solid #4CAF50;
}
.msr-summary-total-label {
    font-size: 16px;
    font-weight: 600;
    color: #2e7d32;
}
.msr-summary-total-value {
    font-size: 24px;
    font-weight: 700;
    color: #1b5e20;
}

.msr-grand-total {
    background: linear-gradient(135deg, #2e7d32 0%, #4CAF50 100%) !important;
    border: 3px solid #1b5e20 !important;
    margin-top: 20px !important;
    padding: 25px !important;
}
.msr-grand-total .msr-summary-total-label {
    font-size: 1.2em;
    color: #fff;
    font-weight: 700;
}
.msr-grand-total .msr-summary-total-value {
    font-size: 2em;
    color: #fff;
}

.msr-domiciliation-total {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%) !important;
    border-color: #ffc107 !important;
}
.msr-domiciliation-total .msr-summary-total-label,
.msr-domiciliation-total .msr-summary-total-value {
    color: #856404 !important;
}

.msr-empty-state {
    text-align: center;
    padding: 20px;
    color: #999;
    font-style: italic;
}

/* ---- Animations ---- */
@keyframes msrFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes msrSlideDown {
    from { transform: translate(-50%, -10px); opacity: 0; }
    to   { transform: translate(-50%, 0);     opacity: 1; }
}
@keyframes msrSlideInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---- Responsive ---- */
@media (max-width: 576px) {
    .msr-inline-fields {
        grid-template-columns: 1fr;
    }
    .msr-buttons {
        flex-direction: column;
    }
    .msr-step-indicators {
        padding: 0 5px;
    }
    .msr-step-line {
        width: 40px;
        margin: 0 5px;
    }
    .msr-step-number {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    .msr-step-label {
        font-size: 10px;
    }
    .msr-info-grid {
        grid-template-columns: 1fr;
    }
    .msr-summary-card-body {
        padding: 15px;
    }
    .msr-summary-total {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

/* Disabled city option */
#msr_city_dom option:disabled {
    background-color: #f0f0f0 !important;
    color: #999 !important;
    opacity: 0.5;
}
