/* Component-specific CSS for KAMKI Application */

/* Navbar Styles - Ensure consistent text colors */
nav.bg-\[#303030\] .font-medium ul li a {
    color: #374151 !important; /* text-gray-700 for mobile */
}

nav.bg-\[#303030\] .font-medium ul li a.md\:text-white {
    color: white !important; /* text-white for desktop */
}

nav.bg-\[#303030\] .font-medium ul li a:hover {
    color: #DDB4BD !important; /* hover color */
}

/* Ensure mobile menu background is consistent */
nav.bg-\[#303030\] .font-medium ul.bg-gray-50 {
    background-color: #f9fafb !important;
}

/* Fix navbar text color issues */
nav.bg-\[#303030\] .font-medium ul li a.text-gray-700 {
    color: #374151 !important;
}

nav.bg-\[#303030\] .font-medium ul li a.md\:text-white {
    color: white !important;
}

/* Ensure dropdown menu text colors are correct */
nav.bg-\[#303030\] .font-medium ul li a.block {
    color: #374151 !important;
}

nav.bg-\[#303030\] .font-medium ul li a.block.md\:text-white {
    color: white !important;
}

/* Gallery Components */
.gallery-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

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

.gallery-card img {
    transition: transform 0.3s ease;
}

.gallery-card:hover img {
    transform: scale(1.05);
}

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

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #DDB4BD;
    box-shadow: 0 0 0 3px rgba(221, 180, 189, 0.1);
}

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

.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* Button Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.375rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    line-height: 1.25rem;
}

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

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

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

.btn-primary {
    background-color: #DDB4BD;
    color: white;
    border-color: #DDB4BD;
}

.btn-primary:hover:not(:disabled) {
    background-color: #91363D;
    border-color: #91363D;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: #6b7280;
    color: white;
    border-color: #6b7280;
}

.btn-secondary:hover:not(:disabled) {
    background-color: #4b5563;
    border-color: #4b5563;
    transform: translateY(-1px);
}

.btn-success {
    background-color: #10b981;
    color: white;
    border-color: #10b981;
}

.btn-success:hover:not(:disabled) {
    background-color: #059669;
    border-color: #059669;
    transform: translateY(-1px);
}

.btn-danger {
    background-color: #ef4444;
    color: white;
    border-color: #ef4444;
}

.btn-danger:hover:not(:disabled) {
    background-color: #dc2626;
    border-color: #dc2626;
    transform: translateY(-1px);
}

.btn-outline {
    background-color: transparent;
    border-color: #d1d5db;
    color: #374151;
}

.btn-outline:hover:not(:disabled) {
    background-color: #f9fafb;
    border-color: #9ca3af;
}

/* Card Components */
.card {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.card-header {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.card-body {
    padding: 1rem;
}

.card-footer {
    padding: 1rem;
    border-top: 1px solid #e5e7eb;
    background-color: #f9fafb;
}

/* Alert Components */
.alert {
    padding: 1rem;
    border-radius: 0.375rem;
    border: 1px solid transparent;
    margin-bottom: 1rem;
}

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

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

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

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

/* Badge Components */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

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

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

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

.badge-gray {
    background-color: #f3f4f6;
    color: #374151;
}

/* Table Components */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.table th {
    background-color: #f9fafb;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: #6b7280;
}

.table tbody tr:hover {
    background-color: #f9fafb;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Loading Components */
.loading-spinner {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #e5e7eb;
    border-radius: 50%;
    border-top-color: #DDB4BD;
    animation: spin 1s linear infinite;
}

.loading-dots {
    display: inline-flex;
    align-items: center;
}

.loading-dots::after {
    content: '';
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background-color: currentColor;
    animation: dots 1.4s infinite ease-in-out both;
}

.loading-dots::before {
    content: '';
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background-color: currentColor;
    animation: dots 1.4s infinite ease-in-out both;
    margin-right: 0.25rem;
}

@keyframes dots {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Modal Components */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 40;
}

.modal-content {
    position: relative;
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 50;
}

/* Dropdown Components */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 50;
    min-width: 10rem;
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-0.5rem);
    transition: all 0.2s ease;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: #374151;
    text-decoration: none;
    border: none;
    background: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f9fafb;
}

.dropdown-divider {
    height: 1px;
    background-color: #e5e7eb;
    margin: 0.5rem 0;
}

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

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem;
    background-color: #1f2937;
    color: white;
    font-size: 0.75rem;
    border-radius: 0.25rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 50;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Progress Components */
.progress {
    width: 100%;
    height: 0.5rem;
    background-color: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
}

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

/* Breadcrumb Components */
.breadcrumb {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: #6b7280;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item:not(:last-child)::after {
    content: '/';
    margin: 0 0.5rem;
    color: #d1d5db;
}

.breadcrumb-link {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-link:hover {
    color: #DDB4BD;
}

.breadcrumb-current {
    color: #374151;
    font-weight: 500;
}

/* Text Clamp Utilities */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Calendar Components */
.calendar {
    font-family: Arial, sans-serif;
}

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

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background-color: #e5e7eb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.calendar-day-header {
    background-color: #f9fafb;
    padding: 12px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
}

.calendar-day {
    background-color: white;
    min-height: 120px;
    padding: 8px;
    position: relative;
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.calendar-day.other-month {
    background-color: #f9fafb;
    color: #9ca3af;
}

.calendar-day.today {
    background-color: #fef3c7;
}

.calendar-day-number {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.event-item {
    background-color: #DDB4BD;
    color: white;
    padding: 2px 6px;
    margin: 1px 0;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: background-color 0.2s;
}

.event-item:hover {
    background-color: #91363D;
}

.event-item.upcoming {
    background-color: #3b82f6;
}

.event-item.ongoing {
    background-color: #10b981;
}

.event-item.completed {
    background-color: #6b7280;
}

.event-item.cancelled {
    background-color: #ef4444;
}

.event-item.multi-day {
    background-color: #f3f4f6;
    color: #374151;
    font-style: italic;
    font-size: 10px;
    padding: 2px 4px;
    margin: 1px 0;
    border-left: 3px solid #DDB4BD;
}

.event-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.event-status.upcoming {
    background-color: #dbeafe;
    color: #1e40af;
}

.event-status.ongoing {
    background-color: #d1fae5;
    color: #065f46;
}

.event-status.completed {
    background-color: #f3f4f6;
    color: #374151;
}

.event-status.cancelled {
    background-color: #fee2e2;
    color: #991b1b;
}

.calendar-navigation {
    display: flex;
    gap: 10px;
    align-items: center;
}

.calendar-nav-btn {
    background-color: #DDB4BD;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.calendar-nav-btn:hover {
    background-color: #91363D;
}

.calendar-nav-btn:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
}

.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
    padding: 15px;
    background-color: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
}

.legend-color.upcoming {
    background-color: #3b82f6;
}

.legend-color.ongoing {
    background-color: #10b981;
}

.legend-color.completed {
    background-color: #6b7280;
}

.legend-color.cancelled {
    background-color: #ef4444;
}

.legend-color.multi-day {
    background-color: #f3f4f6;
    border: 1px solid #d1d5db;
}

/* Quill Editor Components */
.ql-editor {
    min-height: 300px;
    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
}

.ql-toolbar {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.ql-container {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* Event Form Styles */
.event-form .ql-editor {
    min-height: 250px;
}

/* Quill Editor Additional Styles */
.ql-editor {
    min-height: 300px;
    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
}

.ql-toolbar {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.ql-container {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* Prose Content Styles */
.prose {
    color: #374151;
    line-height: 1.75;
}

.prose h3 {
    color: #111827;
    font-weight: 600;
    font-size: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.prose ul {
    margin-top: 1rem;
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.prose li {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.prose p {
    margin-top: 1rem;
    margin-bottom: 1rem;
}
