/* appointments.css - FFO INTEGRATION VERSION */
/* Timestamp: 2025-06-25 */
/* Added: FFO modal and lightning bolt styling */

/* Main container */
.appointments-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header with add button */
.appointments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.appointments-header h1 {
    margin: 0;
    color: #2c3e50;
    font-size: 2rem;
}

/* Add appointment button - matches symptoms style */
.add-appointment-btn {
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 15px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s;
}

.add-appointment-btn:hover {
    background-color: #2980b9;
}

/* Appointment form - matches symptoms form style */
.appointment-form {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: none;
}

.appointment-form h2 {
    margin-top: 0;
    color: #2c3e50;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

/* Form elements match symptoms styling */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group input, 
.form-group textarea, 
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

/* ===========================================
   FFO TRIGGER BUTTON (Lightning Bolt)
   =========================================== */

.ffo-trigger {
    background: transparent;
    border: none;
    color: #3498db;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 3px;
    transition: all 0.3s ease;
    margin-left: 5px;
}

.ffo-trigger:hover {
    background: #e8f4f8;
    color: #2980b9;
}

.ffo-icon {
    animation: boltPulse 2s infinite;
    font-size: 1.1rem;
}

@keyframes boltPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* ===========================================
   FFO MODAL OVERLAY
   =========================================== */

.ffo-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.ffo-modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { 
        transform: translateY(50px);
        opacity: 0;
    }
    to { 
        transform: translateY(0);
        opacity: 1;
    }
}

/* ===========================================
   FFO MODAL HEADER
   =========================================== */

.ffo-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ffo-header h3 {
    margin: 0;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ffo-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.ffo-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ===========================================
   FFO CONTEXT INFO
   =========================================== */

.ffo-context-info {
    background: #e8f4f8;
    padding: 15px 20px;
    border-left: 4px solid #3498db;
    margin: 0;
}

.ffo-context-info p {
    margin: 0;
    color: #2c3e50;
    font-weight: 500;
    font-size: 1rem;
}

/* ===========================================
   FFO DATA SECTION
   =========================================== */

.ffo-data-section {
    padding: 20px;
}

.ffo-source-selection {
    margin-bottom: 20px;
}

.ffo-source-selection label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
}

.ffo-source-selection select {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    background: white;
}

.ffo-source-selection select:focus {
    outline: none;
    border-color: #3498db;
}

.ffo-crud-area label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
}

.ffo-crud-area textarea {
    width: 100%;
    min-height: 200px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
}

.ffo-crud-area textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* ===========================================
   FFO BUTTONS
   =========================================== */

.ffo-buttons {
    padding: 0 20px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.ffo-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.ffo-cancel {
    background: #e74c3c;
    color: white;
}

.ffo-cancel:hover {
    background: #c0392b;
    transform: translateY(-1px);
}

.ffo-accept {
    background: #27ae60;
    color: white;
}

.ffo-accept:hover {
    background: #219a52;
    transform: translateY(-1px);
}

/* Action buttons match symptoms style */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.cancel-form-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 15px;
    cursor: pointer;
    font-weight: 500;
}

.save-btn {
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 15px;
    cursor: pointer;
    font-weight: 500;
}

.cancel-form-btn:hover {
    background-color: #c0392b;
}

.save-btn:hover {
    background-color: #2980b9;
}

/* Appointment cards - matches symptoms card style */
.appointments-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.appointment-card {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
}

.appointment-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.appointment-title {
    margin-top: 0;
    margin-bottom: 10px;
    color: #2c3e50;
    font-size: 1.3rem;
}

.appointment-detail {
    margin-bottom: 5px;
    color: #34495e;
}

.appointment-notes {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
    white-space: pre-line;
}

/* Action buttons match symptoms style */
.appointment-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
}

.edit-btn, .delete-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
}

.edit-btn {
    background-color: #f39c12;
    color: white;
}

.delete-btn {
    background-color: #e74c3c;
    color: white;
}

.edit-btn:hover {
    background-color: #d35400;
}

.delete-btn:hover {
    background-color: #c0392b;
}

/* Status indicator */
.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    margin-left: 10px;
}

.status-upcoming {
    background-color: #3498db;
    color: white;
}

.status-completed {
    background-color: #27ae60;
    color: white;
}

.status-canceled {
    background-color: #e74c3c;
    color: white;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .appointments-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .form-group {
        min-width: 100%;
    }
    
    .appointments-list {
        grid-template-columns: 1fr;
    }
    
    .ffo-modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .ffo-buttons {
        flex-direction: column;
    }
    
    .ffo-btn {
        width: 100%;
    }
}

/* Share button container */
.share-button-container {
    margin: 15px 0;
    display: flex;
    justify-content: flex-end;
}

/* Alert messages */
.alert {
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
    font-weight: 500;
}

.alert-warning {
    background-color: #f39c12;
    color: white;
}

.alert-error {
    background-color: #e74c3c;
    color: white;
}

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

.appointments-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
}

.action-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 20px 0;
}

.share-button-container {
  margin: 0 !important;
}