/* IPhealth Reservation System - Frontend Styles */

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #0ea5e9;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --light-bg: #f8fafc;
    --dark-text: #1e293b;
    --light-text: #64748b;
    --border-color: #e2e8f0;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --card-radius: 16px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--dark-text);
    background-color: var(--light-bg);
}

.iphealth-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.iphealth-header {
    text-align: center;
    margin-bottom: 32px;
    padding: 20px 0;
}

.iphealth-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.iphealth-header p {
    font-size: 1.1rem;
    color: var(--light-text);
    max-width: 600px;
    margin: 0 auto;
}

/* Step Navigation */
.iphealth-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 32px;
    position: relative;
}

.iphealth-steps::before {
    content: '';
    position: absolute;
    top: 24px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--border-color);
    z-index: 1;
}

.iphealth-step {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 80px;
    height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.iphealth-step.active {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.iphealth-step.completed {
    border-color: var(--success-color);
    background: var(--success-color);
    color: white;
}

.iphealth-step-number {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.iphealth-step-label {
    font-size: 0.8rem;
    font-weight: 600;
}

/* Form Styles */
.iphealth-form {
    background: white;
    border-radius: var(--card-radius);
    padding: 32px;
    box-shadow: var(--card-shadow);
    margin-bottom: 32px;
}

.iphealth-form-group {
    margin-bottom: 24px;
}

.iphealth-form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark-text);
}

.iphealth-form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: white;
}

.iphealth-form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.iphealth-form-control:hover {
    border-color: var(--primary-hover);
}

/* Select styling */
.iphealth-form-control.select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

/* Button Styles */
.iphealth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.iphealth-btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.iphealth-btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover), #0284c7);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.iphealth-btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--border-color);
}

.iphealth-btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-hover);
}

.iphealth-btn-danger {
    background: var(--danger-color);
    color: white;
}

.iphealth-btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

.iphealth-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Card Styles */
.iphealth-card {
    background: white;
    border-radius: var(--card-radius);
    padding: 24px;
    box-shadow: var(--card-shadow);
    margin-bottom: 24px;
    transition: transform 0.2s ease;
}

.iphealth-card:hover {
    transform: translateY(-2px);
}

.iphealth-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-color);
}

.iphealth-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* List Styles */
.iphealth-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.iphealth-list-item {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.iphealth-list-item:last-child {
    border-bottom: none;
}

.iphealth-list-item-content {
    flex: 1;
}

.iphealth-list-item-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.iphealth-list-item-meta {
    color: var(--light-text);
    font-size: 0.9rem;
}

/* Status Badges */
.iphealth-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.iphealth-badge-pending {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.iphealth-badge-confirmed {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.iphealth-badge-cancelled {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

/* Login/Upgrade Message */
.iphealth-message {
    text-align: center;
    padding: 40px 20px;
    background: white;
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    margin-bottom: 32px;
}

.iphealth-message h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: var(--primary-color);
}

.iphealth-message p {
    font-size: 1.1rem;
    margin-bottom: 24px;
    color: var(--light-text);
}

/* Signature Canvas */
.iphealth-signature-canvas {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    background: white;
    cursor: crosshair;
    margin-bottom: 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .iphealth-container {
        padding: 16px;
    }
    
    .iphealth-header h1 {
        font-size: 2rem;
    }
    
    .iphealth-form {
        padding: 24px 16px;
    }
    
    .iphealth-step {
        width: 60px;
        height: 60px;
    }
    
    .iphealth-step-number {
        font-size: 1.2rem;
    }
    
    .iphealth-step-label {
        font-size: 0.7rem;
    }
    
    .iphealth-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .iphealth-list-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .iphealth-list-item-actions {
        width: 100%;
        display: flex;
        justify-content: flex-end;
    }
}

/* Loading States */
.iphealth-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.iphealth-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(37, 99, 235, 0.2);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success/Error Messages */
.iphealth-alert {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-weight: 500;
}

.iphealth-alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

.iphealth-alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
    border-left: 4px solid var(--danger-color);
}

/* Insurance Form Specific */
.iphealth-insurance-form .iphealth-form-group {
    margin-bottom: 16px;
}

.iphealth-payment-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

@media (max-width: 768px) {
    .iphealth-payment-options {
        grid-template-columns: 1fr;
    }
}

.iphealth-payment-option {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--card-radius);
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.iphealth-payment-option:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.iphealth-payment-option.selected {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.iphealth-payment-option h4 {
    margin-bottom: 12px;
    color: var(--primary-color);
}

/* Appointment Details */
.iphealth-appointment-details {
    background: white;
    border-radius: var(--card-radius);
    padding: 32px;
    box-shadow: var(--card-shadow);
    text-align: center;
}

.iphealth-appointment-details h2 {
    color: var(--primary-color);
    margin-bottom: 24px;
}

.iphealth-appointment-info {
    text-align: left;
    margin-bottom: 24px;
}

.iphealth-appointment-info-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.iphealth-appointment-info-item:last-child {
    border-bottom: none;
}

.iphealth-appointment-info-label {
    font-weight: 600;
    color: var(--dark-text);
}

.iphealth-appointment-info-value {
    color: var(--light-text);
}