﻿/* survey-links.css */
:root {
    --primary-color: #4361ee;
    --primary-light: #eef2ff;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --border-color: #e5e7eb;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --radius: 12px;
    --transition: all 0.3s ease;
    --modal-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
/* Debug styles - remove after fixing */
.modal-content {
    border: 3px solid red !important;
}

.modal-header {
    background-color: #f8f9fa !important;
    border-bottom: 2px solid #dee2e6 !important;
}

.modal-body {
    background-color: white !important;
    min-height: 200px !important;
}
/* Modal Styles */
.modal-content {
    border: none;
    box-shadow: var(--modal-shadow);
    border-radius: 16px;
    overflow: hidden;
}

/* Smooth modal transitions */
.modal.fade .modal-dialog {
    transform: translateY(-50px);
    transition: transform 0.3s ease-out;
}

.modal.show .modal-dialog {
    transform: translateY(0);
}

/* Modal Header */
.modal-header-survey {
    background: linear-gradient(135deg, var(--primary-color) 0%, #3a56d4 100%);
    color: white;
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 1.5rem;
    border: none;
}

    .modal-header-survey .modal-title {
        font-weight: 600;
        font-size: 1.25rem;
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

        .modal-header-survey .modal-title i {
            font-size: 1.5rem;
        }

    .modal-header-survey .btn-close {
        filter: invert(1) brightness(100);
        opacity: 0.8;
        transition: var(--transition);
    }

        .modal-header-survey .btn-close:hover {
            opacity: 1;
            transform: scale(1.1);
        }

/* Modal Body */
.modal-body-survey {
    padding: 2rem;
    max-height: 70vh;
    overflow-y: auto;
}

    .modal-body-survey::-webkit-scrollbar {
        width: 8px;
    }

    .modal-body-survey::-webkit-scrollbar-track {
        background: #f1f5f9;
        border-radius: 4px;
    }

    .modal-body-survey::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 4px;
    }

        .modal-body-survey::-webkit-scrollbar-thumb:hover {
            background: #94a3b8;
        }

/* Form Elements */
.form-label-survey {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .form-label-survey.required::after {
        content: "*";
        color: var(--danger-color);
        margin-left: 0.25rem;
    }

    .form-label-survey i {
        color: var(--primary-color);
        width: 20px;
    }

.form-control-survey, .form-select-survey {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: var(--transition);
    background-color: white;
}

    .form-control-survey:focus, .form-select-survey:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px var(--primary-light);
        outline: none;
    }

    .form-control-survey:hover, .form-select-survey:hover {
        border-color: #d1d5db;
    }

/* Input Groups */
.input-group-survey {
    position: relative;
}

    .input-group-survey .input-icon {
        position: absolute;
        left: 1rem;
        top: 50%;
        transform: translateY(-50%);
        color: var(--text-secondary);
        z-index: 4;
    }

    .input-group-survey .form-control-survey {
        padding-left: 3rem;
    }

/* Validation Messages */
.validation-message {
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .validation-message i {
        font-size: 0.875rem;
    }

/* Checkbox Cards */
.checkbox-card {
    background: var(--primary-light);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: var(--transition);
    cursor: pointer;
}

    .checkbox-card:hover {
        border-color: var(--primary-color);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(67, 97, 238, 0.1);
    }

    .checkbox-card .form-check-input {
        width: 1.25rem;
        height: 1.25rem;
        margin-top: 0.25rem;
        cursor: pointer;
    }

    .checkbox-card .form-check-label {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        font-weight: 500;
        color: var(--text-primary);
        cursor: pointer;
        margin-left: 0.5rem;
    }

        .checkbox-card .form-check-label i {
            font-size: 1.25rem;
            color: var(--primary-color);
        }

    .checkbox-card .form-text {
        color: var(--text-secondary);
        font-size: 0.875rem;
        margin-left: 2.25rem;
        margin-top: 0.25rem;
    }

/* Sections */
.expiry-section {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 2px solid var(--border-color);
}

    .expiry-section h6 {
        color: var(--primary-color);
        font-weight: 600;
        margin-bottom: 1rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

/* Date Preview */
.date-preview {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    font-weight: 500;
    color: var(--text-primary);
    margin-top: 0.5rem;
}

    .date-preview i {
        color: var(--success-color);
    }

/* Survey Select Section */
.survey-select-section {
    position: relative;
}

    .survey-select-section .badge {
        position: absolute;
        right: 1rem;
        top: 50%;
        transform: translateY(-50%);
        background: var(--primary-light);
        color: var(--primary-color);
        font-weight: 500;
        padding: 0.25rem 0.75rem;
        border-radius: 20px;
    }

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--border-color);
}

/* Buttons */
.btn-modal {
    flex: 1;
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.btn-modal-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #3a56d4 100%);
    color: white;
}

    .btn-modal-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
    }

.btn-modal-secondary {
    background: white;
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
}

    .btn-modal-secondary:hover {
        background: #f9fafb;
        border-color: var(--text-secondary);
    }

/* Form Layout */
.form-row-survey {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Form Group Animations */
.form-group-animated {
    animation: slideUp 0.4s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered animation classes */
.form-group-animated.delay-1 {
    animation-delay: 0.1s;
}

.form-group-animated.delay-2 {
    animation-delay: 0.2s;
}

.form-group-animated.delay-3 {
    animation-delay: 0.3s;
}

.form-group-animated.delay-4 {
    animation-delay: 0.4s;
}

.form-group-animated.delay-5 {
    animation-delay: 0.5s;
}

.form-group-animated.delay-6 {
    animation-delay: 0.6s;
}

.form-group-animated.delay-7 {
    animation-delay: 0.7s;
}

/* Loading State */
.loading {
    position: relative;
    pointer-events: none;
}

    .loading::after {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        width: 1.5rem;
        height: 1.5rem;
        border: 2px solid transparent;
        border-top-color: white;
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
    }

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Success/Error States */
.form-control-survey.success {
    border-color: var(--success-color);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2310b981'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.25rem;
}

.form-control-survey.error {
    border-color: var(--danger-color);
}

/* Tooltip Styling */
.info-tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 0.5rem;
    color: var(--text-secondary);
    cursor: help;
}

    .info-tooltip:hover::after {
        content: attr(data-tooltip);
        position: absolute;
        bottom: 100%;
        left: 50%;
        transform: translateX(-50%);
        background: var(--text-primary);
        color: white;
        padding: 0.5rem 0.75rem;
        border-radius: 6px;
        font-size: 0.75rem;
        white-space: nowrap;
        z-index: 1000;
        margin-bottom: 0.5rem;
    }

    .info-tooltip:hover::before {
        content: "";
        position: absolute;
        bottom: 100%;
        left: 50%;
        transform: translateX(-50%);
        border: 5px solid transparent;
        border-top-color: var(--text-primary);
        margin-bottom: -5px;
        z-index: 1000;
    }

/* Notification Badges */
.status-badge {
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.875rem;
}

    .status-badge.pending {
        background-color: #fef3c7;
        color: #92400e;
    }

    .status-badge.active {
        background-color: #d1fae5;
        color: #065f46;
    }

    .status-badge.completed {
        background-color: #e0e7ff;
        color: #3730a3;
    }

    .status-badge.expired {
        background-color: #fee2e2;
        color: #991b1b;
    }

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.action-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    border: 2px solid transparent;
}

    .action-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .action-btn.view {
        background-color: #e0e7ff;
        color: #4f46e5;
    }

    .action-btn.edit {
        background-color: #fef3c7;
        color: #d97706;
    }

    .action-btn.extend {
        background-color: #d1fae5;
        color: #059669;
    }

    .action-btn.send {
        background-color: #dbeafe;
        color: #3b82f6;
    }

    .action-btn.close {
        background-color: #fee2e2;
        color: #dc2626;
    }

/* Responsive Design */
@media (max-width: 768px) {
    .form-row-survey {
        grid-template-columns: 1fr;
    }

    .modal-body-survey {
        padding: 1.5rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-modal {
        width: 100%;
    }
}

/* Focus Styles */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-color) 0%, #3a56d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Pulse Animation */
@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Table Styles */
.table-survey {
    border-collapse: separate;
    border-spacing: 0;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

    .table-survey thead th {
        background-color: #f8fafc;
        border-bottom: 2px solid var(--border-color);
        font-weight: 600;
        color: var(--text-primary);
        padding: 1rem;
    }

    .table-survey tbody td {
        padding: 1rem;
        border-bottom: 1px solid var(--border-color);
        vertical-align: middle;
    }

    .table-survey tbody tr:hover {
        background-color: #f8fafc;
    }

    .table-survey tbody tr:last-child td {
        border-bottom: none;
    }
/* Add these to survey-links.css */

/* Consent Section */
.consent-section {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 2px solid var(--border-color);
}

    .consent-section h6 {
        color: var(--success-color);
        font-weight: 600;
        margin-bottom: 1rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .consent-section .form-check {
        padding: 0.75rem;
        background: white;
        border-radius: 8px;
        border: 2px solid var(--border-color);
    }

    .consent-section .form-check-input:checked {
        background-color: var(--success-color);
        border-color: var(--success-color);
    }

/* Stats Display */
.stats-display {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border: 2px solid var(--border-color);
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

    .stat-item:last-child {
        border-bottom: none;
    }

.stat-label {
    font-weight: 500;
    color: var(--text-secondary);
}

.stat-value {
    font-weight: 600;
    color: var(--text-primary);
}

/* Dates Section */
.dates-section {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 2px solid var(--border-color);
}

    .dates-section h6 {
        color: var(--primary-color);
        font-weight: 600;
        margin-bottom: 1rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

.date-display {
    background: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    font-weight: 500;
    color: var(--text-primary);
}

/* Danger Button */
.btn-modal-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #dc2626 100%);
    color: white;
}

    .btn-modal-danger:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
    }

/* Additional form animations */
.form-group-animated.delay-8 {
    animation-delay: 0.8s;
}

.form-group-animated.delay-9 {
    animation-delay: 0.9s;
}

.form-group-animated.delay-10 {
    animation-delay: 1.0s;
}

/* Readonly input styling */
.form-control-survey[readonly] {
    background-color: #f8fafc;
    border-color: #e2e8f0;
    color: #64748b;
    cursor: not-allowed;
}

/* Warning text */
.text-warning {
    color: var(--warning-color) !important;
}