/* Cookie Banner and Modal Components */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #1a365d;
    color: white;
    z-index: 2000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.cookie-text h3 {
    color: white;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.cookie-text p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cookie-modal.show {
    display: flex;
}

.cookie-modal-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

.cookie-modal-content h3 {
    color: #1a365d;
    margin-bottom: 1.5rem;
    text-align: center;
}

.cookie-category {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #f7fafc;
    border-radius: 8px;
}

.cookie-category label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    color: #1a365d;
    cursor: pointer;
    margin-bottom: 0.5rem;
}

.cookie-category input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #3182ce;
}

.cookie-category input[type="checkbox"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.cookie-category p {
    color: #4a5568;
    font-size: 0.9rem;
    margin: 0;
    margin-left: 2.25rem;
}

.cookie-modal-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: center;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2d3748;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background-color: white;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.form-group input:invalid {
    border-color: #e53e3e;
}

.form-group input:invalid:focus {
    border-color: #e53e3e;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

.form-error {
    color: #e53e3e;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-success {
    color: #38a169;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid #3182ce;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Alert Components */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid;
}

.alert-success {
    background-color: #f0fff4;
    color: #2f855a;
    border-left-color: #38a169;
}

.alert-error {
    background-color: #fed7d7;
    color: #c53030;
    border-left-color: #e53e3e;
}

.alert-warning {
    background-color: #fffaf0;
    color: #c05621;
    border-left-color: #ed8936;
}

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

/* Modal Components */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.modal-title {
    color: #1a365d;
    margin: 0;
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #718096;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.modal-close:hover {
    background-color: #f7fafc;
    color: #2d3748;
}

.modal-body {
    margin-bottom: 1.5rem;
}

.modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

/* Card Components */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.card-header {
    padding: 1.5rem 2rem;
    background-color: #f7fafc;
    border-bottom: 1px solid #e2e8f0;
}

.card-body {
    padding: 2rem;
}

.card-footer {
    padding: 1.5rem 2rem;
    background-color: #f7fafc;
    border-top: 1px solid #e2e8f0;
}

/* Badge Components */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 9999px;
    line-height: 1.2;
}

.badge-primary {
    background-color: #ebf8ff;
    color: #2c5282;
}

.badge-success {
    background-color: #f0fff4;
    color: #2f855a;
}

.badge-warning {
    background-color: #fffaf0;
    color: #c05621;
}

.badge-error {
    background-color: #fed7d7;
    color: #c53030;
}

/* Tooltip Components */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: #1a365d;
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 8px 12px;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.875rem;
    line-height: 1.4;
}

.tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #1a365d transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Accordion Components */
.accordion {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.accordion-item {
    border-bottom: 1px solid #e2e8f0;
}

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

.accordion-header {
    background: #f7fafc;
    padding: 1rem 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    color: #2d3748;
    transition: background-color 0.3s ease;
}

.accordion-header:hover {
    background-color: #edf2f7;
}

.accordion-header.active {
    background-color: #3182ce;
    color: white;
}

.accordion-icon {
    transition: transform 0.3s ease;
}

.accordion-header.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-content.active {
    max-height: 1000px;
}

.accordion-body {
    padding: 1.5rem;
    color: #4a5568;
    line-height: 1.6;
}

/* Progress Components */
.progress {
    background-color: #e2e8f0;
    border-radius: 9999px;
    overflow: hidden;
    height: 8px;
}

.progress-bar {
    height: 100%;
    background-color: #3182ce;
    border-radius: 9999px;
    transition: width 0.3s ease;
}

.progress-bar-success {
    background-color: #38a169;
}

.progress-bar-warning {
    background-color: #ed8936;
}

.progress-bar-error {
    background-color: #e53e3e;
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .cookie-buttons {
        justify-content: center;
    }
    
    .cookie-modal-content {
        margin: 10px;
    }
    
    .modal-content {
        margin: 10px;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .card-body,
    .card-header,
    .card-footer {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .cookie-buttons {
        flex-direction: column;
    }
    
    .cookie-modal-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

.fade-out {
    opacity: 1;
    animation: fadeOut 0.5s ease forwards;
}

.slide-up {
    transform: translateY(20px);
    opacity: 0;
    animation: slideUp 0.5s ease forwards;
}

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

@keyframes fadeOut {
    to {
        opacity: 0;
    }
}

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

/* Focus Management */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.focus-outline:focus {
    outline: 2px solid #3182ce;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .cookie-banner,
    .cookie-modal,
    .modal {
        display: none !important;
    }
    
    .btn {
        border: 1px solid #000;
        background: none !important;
        color: #000 !important;
    }
}
