/* Tinnitus Therapy Portal - Public Styles */

.ttp-portal-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Authentication Styles */
.ttp-auth-wrapper {
    max-width: 500px;
    margin: 0 auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.ttp-auth-header {
    background: linear-gradient(135deg, #2c5282 0%, #1a365d 100%);
    color: #fff;
    padding: 30px 20px;
    text-align: center;
}

.ttp-auth-header h1 {
    margin: 0 0 5px 0;
    font-size: 28px;
    font-weight: 600;
    color: #ffffff;
}

.ttp-auth-header p {
    margin: 0;
    font-size: 16px;
    opacity: 0.9;
}

.ttp-form-container {
    padding: 30px;
}

.ttp-form-container h2 {
    margin: 0 0 20px 0;
    font-size: 24px;
    color: #2d3748;
}

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

.ttp-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #4a5568;
    font-size: 14px;
}

.ttp-form-group input[type="text"],
.ttp-form-group input[type="email"],
.ttp-form-group input[type="password"],
.ttp-form-group input[type="date"],
.ttp-form-group input[type="time"],
.ttp-form-group input[type="number"],
.ttp-form-group input[type="tel"],
.ttp-form-group select,
.ttp-form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.ttp-form-group input:focus,
.ttp-form-group select:focus,
.ttp-form-group textarea:focus {
    outline: none;
    border-color: #2c5282;
    box-shadow: 0 0 0 3px rgba(44, 82, 130, 0.1);
}

.ttp-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.ttp-form-actions {
    margin-top: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ttp-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.ttp-btn-primary {
    background: #2c5282;
    color: #fff;
}

.ttp-btn-primary:hover {
    background: #1a365d;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(44, 82, 130, 0.3);
}

.ttp-btn-secondary {
    background: #edf2f7;
    color: #2d3748;
}

.ttp-btn-secondary:hover {
    background: #e2e8f0;
}

.ttp-btn-disabled {
    background: #cbd5e0;
    color: #718096;
    cursor: not-allowed;
}

.ttp-btn-disabled:hover {
    background: #cbd5e0;
    transform: none;
    box-shadow: none;
}

.ttp-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ttp-link {
    color: #2c5282;
    text-decoration: none;
    font-size: 14px;
}

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

.ttp-form-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

/* Dashboard Styles */
.ttp-dashboard {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
    min-height: 500px;
}

.ttp-sidebar {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.ttp-sidebar-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}

.ttp-sidebar-header h3 {
    margin: 0 0 5px 0;
    font-size: 18px;
    color: #2d3748;
}

.ttp-sidebar-header p {
    margin: 0;
    font-size: 14px;
    color: #718096;
}

.ttp-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ttp-nav li {
    margin-bottom: 8px;
}

.ttp-nav a {
    display: block;
    padding: 10px 15px;
    color: #4a5568;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
}

.ttp-nav a:hover,
.ttp-nav a.active {
    background: #edf2f7;
    color: #2c5282;
}

.ttp-logout {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

.ttp-content {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

.ttp-content h2 {
    margin: 0 0 20px 0;
    font-size: 26px;
    color: #2d3748;
}

.ttp-alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.ttp-alert-info {
    background: #ebf8ff;
    border-left: 4px solid #3182ce;
    color: #2c5282;
}

.ttp-alert-success {
    background: #f0fff4;
    border-left: 4px solid #38a169;
    color: #22543d;
}

.ttp-alert-warning {
    background: #fffaf0;
    border-left: 4px solid #dd6b20;
    color: #744210;
}

/* Cards */
.ttp-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.ttp-card-disabled {
    opacity: 0.6;
    background: #f7fafc;
    position: relative;
}

.ttp-card-disabled::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(0, 0, 0, 0.02) 10px,
        rgba(0, 0, 0, 0.02) 20px
    );
    pointer-events: none;
    border-radius: 8px;
}

.ttp-card-header {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.ttp-card-header h3 {
    margin: 0;
    font-size: 18px;
    color: #2d3748;
}

.ttp-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* Calendar */
.ttp-calendar {
    margin: 20px 0;
    max-width: 100%;
}

.ttp-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    gap: 10px;
}

.ttp-calendar-prev,
.ttp-calendar-next {
    background: #edf2f7;
    border: 1px solid #cbd5e0;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    border-radius: 6px;
    white-space: nowrap;
    transition: all 0.2s;
}

.ttp-calendar-prev:hover,
.ttp-calendar-next:hover {
    background: #e2e8f0;
    border-color: #2c5282;
}

.ttp-calendar-month {
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    flex: 1;
}

.ttp-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    max-width: 420px;
    margin: 0 auto;
}

.ttp-calendar-day-name {
    text-align: center;
    font-weight: 600;
    padding: 6px 2px;
    color: #4a5568;
    font-size: 11px;
}

.ttp-calendar-day {
    aspect-ratio: 1;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 4px 2px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    min-height: 36px;
    position: relative;
}

.ttp-calendar-day:hover:not(.disabled):not(.no-availability) {
    border-color: #2c5282;
    background: #edf2f7;
    transform: scale(1.08);
}

.ttp-calendar-day.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: #f7fafc;
}

.ttp-calendar-day.disabled:hover {
    border-color: #e2e8f0;
    background: #f7fafc;
    transform: none;
}

/* Color-coded availability indicators */
.ttp-calendar-day.no-availability {
    background: #fee;
    border-color: #fbb;
    color: #c53030;
    cursor: not-allowed;
    opacity: 0.7;
}

.ttp-calendar-day.no-availability:hover {
    background: #fee;
    border-color: #fbb;
    transform: none;
}

.ttp-calendar-day.has-availability {
    background: #e6ffed;
    border-color: #9ae6b4;
    color: #22543d;
}

.ttp-calendar-day.has-availability:hover {
    background: #c6f6d5;
    border-color: #68d391;
}

.ttp-calendar-day.selected {
    background: #2c5282 !important;
    color: white !important;
    border-color: #2c5282 !important;
    font-weight: 600;
    transform: scale(1.1);
}

.ttp-calendar-day.today {
    border-color: #2c5282;
    border-width: 2px;
    font-weight: 600;
}

/* Calendar legend */
.ttp-calendar-legend {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 12px;
    padding: 10px;
    background: #f7fafc;
    border-radius: 6px;
    font-size: 12px;
    flex-wrap: wrap;
}

.ttp-calendar-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ttp-calendar-legend-box {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid;
}

.ttp-calendar-legend-box.available {
    background: #e6ffed;
    border-color: #9ae6b4;
}

.ttp-calendar-legend-box.unavailable {
    background: #fee;
    border-color: #fbb;
}

.ttp-time-slots {
    margin-bottom: 20px;
}

.ttp-time-slots h3 {
    font-size: 17px;
    margin-bottom: 12px;
    color: #2d3748;
    font-weight: 600;
}

.ttp-time-slots-wrapper {
    background: #f8fafc;
    border: 2px solid #2c5282;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(44, 82, 130, 0.1);
}

.ttp-slot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.ttp-time-slot {
    padding: 12px 8px;
    border: 2px solid #cbd5e0;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

.ttp-time-slot:hover {
    border-color: #2c5282;
    background: #edf2f7;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(44, 82, 130, 0.15);
}

.ttp-time-slot.selected {
    background: #2c5282;
    color: white;
    border-color: #2c5282;
    font-weight: 600;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 82, 130, 0.3);
}

@media (max-width: 640px) {
    .ttp-calendar-grid {
        max-width: 100%;
        gap: 2px;
    }
    
    .ttp-calendar-day {
        font-size: 12px;
        min-height: 32px;
        padding: 2px;
    }
    
    .ttp-calendar-day-name {
        font-size: 10px;
        padding: 4px 1px;
    }
    
    .ttp-slot-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
    
    .ttp-calendar-legend {
        font-size: 11px;
        gap: 12px;
    }
}

    transform: translateY(-2px);
}

.ttp-time-slot.selected {
    background: #2c5282;
    color: white;
    border-color: #2c5282;
    font-weight: 600;
}

/* File Upload */
.ttp-file-upload,
.ttp-file-upload-zone {
    border: 2px dashed #cbd5e0;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #f7fafc;
}

.ttp-file-upload:hover,
.ttp-file-upload-zone:hover {
    border-color: #2c5282;
    background: #edf2f7;
}

.ttp-file-upload.dragover {
    border-color: #2c5282;
    background: #e6f2ff;
    border-style: solid;
}

.ttp-file-upload input[type="file"] {
    display: none;
}

.ttp-file-upload #upload-prompt {
    cursor: pointer;
    user-select: none;
}

/* Table */
.ttp-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.ttp-table th,
.ttp-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.ttp-table th {
    background: #f7fafc;
    font-weight: 600;
    color: #4a5568;
}

.ttp-table tr:hover {
    background: #f7fafc;
}

/* Badge */
.ttp-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.ttp-badge-pending {
    background: #fef5e7;
    color: #d97706;
}

.ttp-badge-accepted {
    background: #d4edda;
    color: #22543d;
}

.ttp-badge-rejected {
    background: #f8d7da;
    color: #c53030;
}

.ttp-badge-scheduled {
    background: #cfe2ff;
    color: #084298;
}

/* Responsive */
@media (max-width: 768px) {
    .ttp-dashboard {
        grid-template-columns: 1fr;
    }
    
    .ttp-form-row {
        grid-template-columns: 1fr;
    }
    
    .ttp-card-grid {
        grid-template-columns: 1fr;
    }
    
    .ttp-calendar-grid {
        gap: 2px;
    }
    
    .ttp-calendar-day {
        font-size: 12px;
        padding: 6px 2px;
        min-height: 35px;
    }
    
    .ttp-calendar-day-name {
        font-size: 11px;
        padding: 6px 2px;
    }
    
    .ttp-calendar-month {
        font-size: 14px;
    }
    
    .ttp-calendar-prev,
    .ttp-calendar-next {
        font-size: 12px;
        padding: 6px 10px;
    }
    
    .ttp-slot-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 6px;
    }
    
    .ttp-time-slot {
        padding: 8px 6px;
        font-size: 13px;
    }
    
    .ttp-content {
        padding: 20px 15px;
    }
    
    .ttp-table {
        font-size: 14px;
    }
    
    .ttp-table th,
    .ttp-table td {
        padding: 8px 6px;
    }
}

@media (max-width: 480px) {
    .ttp-portal-container {
        padding: 10px;
        margin: 20px auto;
    }
    
    .ttp-calendar-day-name {
        font-size: 10px;
    }
    
    .ttp-calendar-day {
        font-size: 11px;
    }
}
