/* Utility Classes for Project Details */

/* Spacing Utilities */
.m-0 {
    margin: 0;
}
.m-1 {
    margin: 8px;
}
.m-2 {
    margin: 16px;
}
.m-3 {
    margin: 24px;
}
.m-4 {
    margin: 32px;
}

.mt-0 {
    margin-top: 0;
}
.mt-1 {
    margin-top: 8px;
}
.mt-2 {
    margin-top: 16px;
}
.mt-3 {
    margin-top: 24px;
}
.mt-4 {
    margin-top: 32px;
}

.mb-0 {
    margin-bottom: 0;
}
.mb-1 {
    margin-bottom: 8px;
}
.mb-2 {
    margin-bottom: 16px;
}
.mb-3 {
    margin-bottom: 24px;
}
.mb-4 {
    margin-bottom: 32px;
}

.p-0 {
    padding: 0;
}
.p-1 {
    padding: 8px;
}
.p-2 {
    padding: 16px;
}
.p-3 {
    padding: 24px;
}
.p-4 {
    padding: 32px;
}

.pt-0 {
    padding-top: 0;
}
.pt-1 {
    padding-top: 8px;
}
.pt-2 {
    padding-top: 16px;
}
.pt-3 {
    padding-top: 24px;
}
.pt-4 {
    padding-top: 32px;
}

.pb-0 {
    padding-bottom: 0;
}
.pb-1 {
    padding-bottom: 8px;
}
.pb-2 {
    padding-bottom: 16px;
}
.pb-3 {
    padding-bottom: 24px;
}
.pb-4 {
    padding-bottom: 32px;
}

/* Display Utilities */
.d-none {
    display: none !important;
}
.d-block {
    display: block !important;
}
.d-flex {
    display: flex !important;
}
.d-grid {
    display: grid !important;
}
.d-inline {
    display: inline !important;
}
.d-inline-block {
    display: inline-block !important;
}
.d-inline-flex {
    display: inline-flex !important;
}

/* Flex Utilities */
.flex-row {
    flex-direction: row;
}
.flex-column {
    flex-direction: column;
}
.flex-wrap {
    flex-wrap: wrap;
}
.flex-nowrap {
    flex-wrap: nowrap;
}

.justify-start {
    justify-content: flex-start;
}
.justify-center {
    justify-content: center;
}
.justify-end {
    justify-content: flex-end;
}
.justify-between {
    justify-content: space-between;
}
.justify-around {
    justify-content: space-around;
}

.align-start {
    align-items: flex-start;
}
.align-center {
    align-items: center;
}
.align-end {
    align-items: flex-end;
}
.align-stretch {
    align-items: stretch;
}

.flex-1 {
    flex: 1;
}
.flex-auto {
    flex: auto;
}
.flex-none {
    flex: none;
}

/* Text Utilities */
.text-left {
    text-align: left;
}
.text-center {
    text-align: center;
}
.text-right {
    text-align: right;
}
.text-justify {
    text-align: justify;
}

.text-uppercase {
    text-transform: uppercase;
}
.text-lowercase {
    text-transform: lowercase;
}
.text-capitalize {
    text-transform: capitalize;
}

.font-normal {
    font-weight: 400;
}
.font-medium {
    font-weight: 500;
}
.font-semibold {
    font-weight: 600;
}
.font-bold {
    font-weight: 700;
}

.text-xs {
    font-size: 12px;
    line-height: 16px;
}
.text-sm {
    font-size: 14px;
    line-height: 20px;
}
.text-base {
    font-size: 16px;
    line-height: 24px;
}
.text-lg {
    font-size: 18px;
    line-height: 28px;
}
.text-xl {
    font-size: 20px;
    line-height: 28px;
}
.text-2xl {
    font-size: 24px;
    line-height: 32px;
}
.text-3xl {
    font-size: 30px;
    line-height: 36px;
}

/* Color Utilities */
.text-black {
    color: #000000;
}
.text-white {
    color: #ffffff;
}
.text-gray-500 {
    color: #777777;
}
.text-gray-400 {
    color: #9ca3af;
}
.text-primary {
    color: #ff4c4b;
}
.text-success {
    color: #2e7d32;
}
.text-warning {
    color: #f57f17;
}
.text-danger {
    color: #c62828;
}

.bg-white {
    background-color: #ffffff;
}
.bg-gray-50 {
    background-color: #f9f9f9;
}
.bg-gray-100 {
    background-color: #f0f0f0;
}
.bg-primary {
    background-color: #ff4c4b !important;
}
.bg-primary-light {
    background-color: rgba(255, 76, 75, 0.1);
}

/* Border Utilities */
.border {
    border: 1px solid #e8e8e8;
}
.border-t {
    border-top: 1px solid #e8e8e8;
}
.border-b {
    border-bottom: 1px solid #e8e8e8;
}
.border-l {
    border-left: 1px solid #e8e8e8;
}
.border-r {
    border-right: 1px solid #e8e8e8;
}

.border-primary {
    border-color: #ff4c4b;
}
.border-gray-200 {
    border-color: #e8e8e8;
}
.border-gray-300 {
    border-color: #d9d9d9;
}

.rounded {
    border-radius: 4px;
}
.rounded-md {
    border-radius: 6px;
}
.rounded-lg {
    border-radius: 8px;
}
.rounded-xl {
    border-radius: 12px;
}
.rounded-full {
    border-radius: 50%;
}

/* Width and Height Utilities */
.w-full {
    width: 100%;
}
.w-auto {
    width: auto;
}
.w-fit {
    width: fit-content;
}

.h-full {
    height: 100%;
}
.h-auto {
    height: auto;
}
.h-fit {
    height: fit-content;
}

/* Position Utilities */
.relative {
    position: relative;
}
.absolute {
    position: absolute;
}
.fixed {
    position: fixed;
}
.sticky {
    position: sticky;
}

/* Overflow Utilities */
.overflow-hidden {
    overflow: hidden;
}
.overflow-auto {
    overflow: auto;
}
.overflow-visible {
    overflow: visible;
}

/* Cursor Utilities */
.cursor-pointer {
    cursor: pointer;
}
.cursor-default {
    cursor: default;
}
.cursor-not-allowed {
    cursor: not-allowed;
}

/* Shadow Utilities */
.shadow-sm {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.shadow {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
}
.shadow-md {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
}
.shadow-lg {
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
}
.shadow-xl {
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04);
}

/* Transition Utilities */
.transition {
    transition: all 0.3s ease;
}
.transition-colors {
    transition: color 0.3s ease, background-color 0.3s ease,
        border-color 0.3s ease;
}
.transition-transform {
    transition: transform 0.3s ease;
}
.transition-opacity {
    transition: opacity 0.3s ease;
}

/* Transform Utilities */
.scale-105 {
    transform: scale(1.05);
}
.scale-110 {
    transform: scale(1.1);
}
.translate-y-1 {
    transform: translateY(4px);
}
.translate-y-2 {
    transform: translateY(8px);
}
.-translate-y-1 {
    transform: translateY(-4px);
}
.-translate-y-2 {
    transform: translateY(-8px);
}

/* Animation Keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes bounce {
    0%,
    20%,
    53%,
    80%,
    100% {
        transform: translate3d(0, 0, 0);
    }
    40%,
    43% {
        transform: translate3d(0, -30px, 0);
    }
    70% {
        transform: translate3d(0, -15px, 0);
    }
    90% {
        transform: translate3d(0, -4px, 0);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

/* Animation Classes */
.animate-fadeIn {
    animation: fadeIn 0.5s ease-in;
}

.animate-fadeOut {
    animation: fadeOut 0.5s ease-out;
}

.animate-slideInUp {
    animation: slideInUp 0.6s ease-out;
}

.animate-slideInDown {
    animation: slideInDown 0.6s ease-out;
}

.animate-slideInLeft {
    animation: slideInLeft 0.6s ease-out;
}

.animate-slideInRight {
    animation: slideInRight 0.6s ease-out;
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-bounce {
    animation: bounce 1s infinite;
}

.animate-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
}

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.hover-grow {
    transition: transform 0.3s ease;
}

.hover-grow:hover {
    transform: scale(1.05);
}

.hover-primary {
    transition: color 0.3s ease, background-color 0.3s ease;
}

.hover-primary:hover {
    background-color: #ff4c4b;
    color: #ffffff;
}

/* Loading States */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.loading-spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #ff4c4b;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
}

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

/* Focus States */
.focus-ring:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 76, 75, 0.2);
}

.focus-ring-inset:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px rgba(255, 76, 75, 0.5);
}

/* Accessibility */
.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;
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }

    .print-only {
        display: block !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .project-details-container {
        box-shadow: none !important;
        border: none !important;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    .dark-mode .bg-white {
        background-color: #1a1a1a;
    }

    .dark-mode .text-black {
        color: #ffffff;
    }

    .dark-mode .border {
        border-color: #333333;
    }

    .dark-mode .bg-gray-50 {
        background-color: #2a2a2a;
    }
}
