/* CSStudio Custom Styles */

/* Utility Classes */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Aspect Ratio (for browsers without native support) */
.aspect-w-16 {
    position: relative;
    padding-bottom: 56.25%;
}

.aspect-w-16 > * {
    position: absolute;
    height: 100%;
    width: 100%;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

/* Form Styles */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-radius: 50%;
    border-top-color: #3b82f6;
    animation: spin 1s ease-in-out infinite;
}

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

/* HTMX Loading Indicator */
.htmx-request .htmx-indicator {
    display: inline-block;
}

.htmx-indicator {
    display: none;
}

/* Card Hover Effects */
.card-hover {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

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

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

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

.badge-cancelled {
    background-color: #f3f4f6;
    color: #4b5563;
}

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

/* File Upload Zone */
.upload-zone {
    border: 2px dashed #d1d5db;
    border-radius: 0.5rem;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.upload-zone:hover {
    border-color: #3b82f6;
    background-color: #eff6ff;
}

.upload-zone.dragover {
    border-color: #3b82f6;
    background-color: #dbeafe;
}

/* Story/Template Image - Responsive, maintains aspect ratio */
.story-image {
    width: 80%;
    height: auto;
    object-fit: contain;
}

@media (min-width: 1024px) {
    .story-image {
        max-width: 40%;
    }
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Print Styles */
@media print {
    header,
    footer,
    nav,
    button {
        display: none !important;
    }
}
