/* Component Styles */

/* Cards */
.card {
    background-color: white;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--gray-200);
    background-color: var(--gray-50);
}

/* Measure Cards */
.measure-card {
    background-color: white;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.measure-header {
    padding: 1.5rem;
    cursor: pointer;
    transition: opacity 0.15s ease-in-out;
}

.measure-header:hover {
    opacity: 0.9;
}

.measure-header.healthfirst {
    background-color: var(--healthfirst);
}

.measure-header.fidelis {
    background-color: var(--fidelis);
}

.measure-header.uhc {
    background-color: var(--uhc);
}

.measure-header.molina {
    background-color: var(--molina);
}

.measure-content {
    padding: 1.5rem;
    border-top: 1px solid var(--gray-200);
    display: none;
}

.measure-content.show {
    display: block;
}

.measure-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.measure-detail-item {
    margin-bottom: 1rem;
}

.measure-detail-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.measure-detail-icon {
    color: var(--gray-500);
    margin-right: 0.5rem;
}

.measure-detail-content {
    color: var(--gray-700);
    background-color: var(--gray-50);
    padding: 0.75rem;
    border-radius: 0.75rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    text-decoration: none;
    font-family: inherit;
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: var(--gray-100);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background-color: var(--gray-200);
}

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

.btn-danger:hover {
    background-color: #dc2626;
}

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

.btn-success:hover {
    background-color: #059669;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.btn-icon {
    margin-right: 0.5rem;
}

/* Form Elements */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.15s ease-in-out;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
}

.form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.15s ease-in-out;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
}

.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
}

.form-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.15s ease-in-out;
    font-family: inherit;
    background-color: white;
}

.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
}

/* Tables */
.table-container {
    background-color: white;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    padding: 1rem 1.5rem;
    text-align: left;
    font-size: 0.875rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    color: var(--gray-800);
    background-color: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    vertical-align: middle;
}

.table tbody tr:hover {
    background-color: var(--gray-50);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tfoot {
    background-color: var(--gray-50);
    font-weight: 600;
}

.table tfoot td {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-200);
}

/* Step Cards */
.step-card {
    background-color: white;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.step-number {
    width: 3rem;
    height: 3rem;
    background-color: #dbeafe;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
}

.step-number span {
    color: var(--primary);
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.125rem;
}

.step-content {
    display: flex;
    align-items: center;
}

.step-icon {
    color: var(--gray-500);
    font-size: 1.25rem;
    margin-right: 1rem;
}

.step-text {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--gray-800);
}

/* Image Upload */
.image-upload-container {
    background-color: white;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
}

.image-upload-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.75rem;
    font-size: 0.875rem;
    transition: all 0.15s ease-in-out;
    margin-bottom: 1rem;
}

.image-upload-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
}

.image-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.image-preview-item {
    position: relative;
    border-radius: 0.75rem;
    overflow: hidden;
}

.image-preview-item img {
    width: 100%;
    height: 8rem;
    object-fit: cover;
}

.image-preview-item .remove-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background-color: var(--danger);
    color: white;
    border: none;
    border-radius: 50%;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s ease-in-out;
}

.image-preview-item:hover .remove-btn {
    opacity: 1;
}

.upload-placeholder {
    border: 2px dashed var(--gray-300);
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
    color: var(--gray-500);
}

.upload-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
}

.alert-success {
    background-color: #d1fae5;
    border-color: #a7f3d0;
    color: #065f46;
}

.alert-warning {
    background-color: #fef3c7;
    border-color: #fde68a;
    color: #92400e;
}

.alert-danger {
    background-color: #fee2e2;
    border-color: #fecaca;
    color: #991b1b;
}

.alert-info {
    background-color: #dbeafe;
    border-color: #bfdbfe;
    color: #1e40af;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-success {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background-color: #dbeafe;
    color: #1e40af;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--gray-300);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Modal Styles */
.fixed {
    position: fixed;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.bg-black {
    background-color: #000;
}

.bg-opacity-50 {
    background-color: rgba(0, 0, 0, 0.5);
}

.z-50 {
    z-index: 50;
}

.max-w-2xl {
    max-width: 42rem;
}

.mx-4 {
    margin-left: 1rem;
    margin-right: 1rem;
}

.max-h-\[90vh\] {
    max-height: 90vh;
}

.overflow-y-auto {
    overflow-y: auto;
}

.space-x-3 > * + * {
    margin-left: 0.75rem;
}

.pt-4 {
    padding-top: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .measure-details {
        grid-template-columns: 1fr;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .table {
        min-width: 600px;
    }
    
    .image-preview {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media (max-width: 480px) {
    .card-body,
    .card-header,
    .card-footer {
        padding: 1rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .step-content {
        flex-direction: column;
        text-align: center;
    }
    
    .step-number {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
}

/* Measure Images Styles */
.measure-images-container {
    padding: 1rem 0;
}

.loading-placeholder {
    text-align: center;
    padding: 3rem;
    color: var(--gray-500);
}

.loading-placeholder i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.no-images-placeholder {
    text-align: center;
    padding: 3rem;
    color: var(--gray-500);
    border: 2px dashed var(--gray-300);
    border-radius: 0.75rem;
}

.no-images-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.measure-group {
    margin-bottom: 2rem;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.measure-group-title {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    padding: 1rem 1.5rem;
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1.25rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.measure-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    padding: 1.5rem;
}

.measure-image-item {
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.measure-image-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.measure-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.measure-image-label {
    padding: 0.5rem;
    text-align: center;
    background: var(--gray-50);
    color: var(--gray-700);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Image Modal Styles */
.image-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.image-modal {
    background: white;
    border-radius: 0.75rem;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.image-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.image-modal-title {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    color: var(--gray-800);
}

.image-modal-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--gray-500);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: color 0.2s ease;
}

.image-modal-close:hover {
    color: var(--gray-700);
}

.image-modal-content {
    padding: 1rem;
    text-align: center;
}

.image-modal-img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 0.5rem;
}

/* Responsive adjustments for measure images */
@media (max-width: 768px) {
    .measure-images-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.75rem;
        padding: 1rem;
    }
    
    .measure-image {
        height: 120px;
    }
    
    .image-modal {
        max-width: 95vw;
        margin: 0.5rem;
    }
    
    .image-modal-header {
        padding: 0.75rem 1rem;
    }
    
    .image-modal-content {
        padding: 0.75rem;
    }
}

/* Utility classes for flexbox */
.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.mr-2 {
    margin-right: 0.5rem;
}

/* No results message for measure images */
.no-results-message {
    text-align: center;
    padding: 3rem;
    color: var(--gray-500);
    border: 2px dashed var(--gray-300);
    border-radius: 0.75rem;
    margin-top: 1rem;
}

.no-results-message i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--gray-400);
}

/* No data placeholder */
.no-data-placeholder {
    text-align: center;
    padding: 3rem;
    color: var(--gray-500);
    border: 2px dashed var(--gray-300);
    border-radius: 0.75rem;
}

.no-data-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--gray-400);
}

/* Error placeholder */
.error-placeholder {
    text-align: center;
    padding: 3rem;
    color: var(--red-600);
    border: 2px dashed var(--red-300);
    border-radius: 0.75rem;
    background-color: var(--red-50);
}

.error-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--red-500);
} 