/* 
 * Onboarding Module CSS
 * Hospital Management System - Sanvya Health Software
 */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
}

/* Utility Classes */
.text-primary-custom {
    color: #3498db !important;
}

.bg-primary-custom {
    background-color: #3498db !important;
}

.text-success-custom {
    color: #27ae60 !important;
}

.text-danger-custom {
    color: #e74c3c !important;
}

.text-warning-custom {
    color: #f39c12 !important;
}

.shadow-custom {
    box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
}

.border-radius-custom {
    border-radius: 15px !important;
}

/* Buttons */
.btn-custom {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-block;
}

.btn-primary-custom {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
}

.btn-primary-custom:hover {
    background: linear-gradient(45deg, #2980b9, #1f618d);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
    color: white;
    text-decoration: none;
}

.btn-success-custom {
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    color: white;
}

.btn-success-custom:hover {
    background: linear-gradient(45deg, #229954, #27ae60);
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
}

.btn-danger-custom {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
}

.btn-danger-custom:hover {
    background: linear-gradient(45deg, #c0392b, #a93226);
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
}

.btn-outline-custom {
    background: transparent;
    border: 2px solid #3498db;
    color: #3498db;
}

.btn-outline-custom:hover {
    background: #3498db;
    color: white;
}

/* Form Elements */
.form-group-custom {
    margin-bottom: 25px;
}

.form-label-custom {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    display: block;
}

.form-control-custom {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

.form-control-custom:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-control-custom.is-invalid {
    border-color: #e74c3c;
}

.form-control-custom.is-valid {
    border-color: #27ae60;
}

.invalid-feedback-custom {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 5px;
    display: block;
}

.valid-feedback-custom {
    color: #27ae60;
    font-size: 14px;
    margin-top: 5px;
    display: block;
}

/* Cards */
.card-custom {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: none;
    overflow: hidden;
    transition: all 0.3s ease;
}

.card-custom:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.card-header-custom {
    background: linear-gradient(45deg, #2c3e50, #3498db);
    color: white;
    padding: 30px;
    text-align: center;
}

.card-body-custom {
    padding: 30px;
}

/* Alerts */
.alert-custom {
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
    border: none;
}

.alert-success-custom {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #27ae60;
}

.alert-danger-custom {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #e74c3c;
}

.alert-warning-custom {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid #f39c12;
}

.alert-info-custom {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #3498db;
}

/* Progress Steps */
.steps-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
    max-width: 200px;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ecf0f1;
    color: #7f8c8d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 10px;
    position: relative;
    z-index: 2;
}

.step-number.active {
    background: #3498db;
    color: white;
}

.step-number.completed {
    background: #27ae60;
    color: white;
}

.step-title {
    font-size: 14px;
    color: #7f8c8d;
    text-align: center;
}

.step-item.active .step-title {
    color: #3498db;
    font-weight: 600;
}

.step-item.completed .step-title {
    color: #27ae60;
    font-weight: 600;
}

.step-line {
    position: absolute;
    top: 20px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: #ecf0f1;
    z-index: 1;
}

.step-item:last-child .step-line {
    display: none;
}

.step-line.completed {
    background: #27ae60;
}

/* Loading Animations */
.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Fade Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.5s ease-in;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Status Icons */
.status-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.status-icon.success {
    color: #27ae60;
    animation: bounceIn 0.6s ease;
}

.status-icon.error {
    color: #e74c3c;
    animation: shake 0.6s ease;
}

.status-icon.warning {
    color: #f39c12;
    animation: pulse 2s infinite;
}

.status-icon.processing {
    color: #3498db;
    animation: spin 2s linear infinite;
}

@keyframes bounceIn {
    0%, 20%, 40%, 60%, 80%, 100% {
        transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
    }
    0% {
        opacity: 0;
        transform: scale3d(.3, .3, .3);
    }
    20% {
        transform: scale3d(1.1, 1.1, 1.1);
    }
    40% {
        transform: scale3d(.9, .9, .9);
    }
    60% {
        opacity: 1;
        transform: scale3d(1.03, 1.03, 1.03);
    }
    80% {
        transform: scale3d(.97, .97, .97);
    }
    100% {
        opacity: 1;
        transform: scale3d(1, 1, 1);
    }
}

@keyframes shake {
    10%, 90% {
        transform: translate3d(-1px, 0, 0);
    }
    20%, 80% {
        transform: translate3d(2px, 0, 0);
    }
    30%, 50%, 70% {
        transform: translate3d(-4px, 0, 0);
    }
    40%, 60% {
        transform: translate3d(4px, 0, 0);
    }
}

/* Payment Cards */
.payment-method-card {
    border: 2px solid #ecf0f1;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.payment-method-card:hover {
    border-color: #3498db;
    background: #f8f9fa;
}

.payment-method-card.selected {
    border-color: #3498db;
    background: rgba(52, 152, 219, 0.1);
}

.payment-method-icon {
    font-size: 24px;
    color: #3498db;
    margin-bottom: 10px;
}

/* Subscription Plan Cards */
.subscription-card {
    border: 2px solid #ecf0f1;
    border-radius: 15px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    position: relative;
    height: 100%;
}

.subscription-card:hover {
    border-color: #3498db;
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(52, 152, 219, 0.1);
}

.subscription-card.selected {
    border-color: #3498db;
    background: rgba(52, 152, 219, 0.05);
}

.subscription-card.popular {
    border-color: #f39c12;
    position: relative;
}

.subscription-card.popular::before {
    content: 'POPULAR';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #f39c12;
    color: white;
    padding: 5px 20px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
}

.plan-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c3e50;
}

.plan-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: #3498db;
    margin-bottom: 5px;
}

.plan-period {
    color: #7f8c8d;
    margin-bottom: 20px;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.plan-features li {
    padding: 8px 0;
    color: #7f8c8d;
    position: relative;
    padding-left: 25px;
}

.plan-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #27ae60;
    font-weight: bold;
}

/* Security Elements */
.security-badge {
    display: inline-flex;
    align-items: center;
    background: #e8f5e8;
    color: #27ae60;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin: 5px;
}

.security-badge i {
    margin-right: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .card-custom {
        margin: 10px;
    }
    
    .card-header-custom,
    .card-body-custom {
        padding: 20px;
    }
    
    .steps-container {
        flex-direction: column;
    }
    
    .step-item {
        margin-bottom: 20px;
        max-width: none;
    }
    
    .step-line {
        display: none;
    }
    
    .subscription-card {
        margin-bottom: 20px;
    }
    
    .btn-custom {
        width: 100%;
        margin-bottom: 10px;
    }
}

@media (max-width: 576px) {
    .form-control-custom {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .plan-price {
        font-size: 2rem;
    }
    
    .status-icon {
        font-size: 48px;
    }
}

/* Print Styles */
@media print {
    .btn-custom,
    .card-header-custom {
        display: none;
    }
    
    .card-custom {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .form-control-custom {
        border-width: 3px;
    }
    
    .btn-custom {
        border: 2px solid;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    body {
        background: #1a1a1a;
        color: #ffffff;
    }
    
    .card-custom {
        background: #2d2d2d;
        color: #ffffff;
    }
    
    .form-control-custom {
        background: #3d3d3d;
        border-color: #555;
        color: #ffffff;
    }
    
    .form-control-custom:focus {
        border-color: #3498db;
        background: #3d3d3d;
    }
}
