/* ExInform Frontend Styles - FIXED VERSION */

:root {
    --exif-icon-size: 60px;
    --exif-spacing: 20px;
    --exif-border-radius: 8px;
}

.exif-wrapper {
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.exif-empty {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
}

/* Grid Layout */
.exif-layout-grid .exif-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--exif-spacing);
}

/* List Layout */
.exif-layout-list .exif-container {
    display: flex;
    flex-direction: column;
    gap: var(--exif-spacing);
}

/* Information Item */
.exif-item {
    display: flex;
    gap: var(--exif-spacing);
    padding: 20px;
    border-radius: var(--exif-border-radius);
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.exif-item:hover,
.exif-item.exif-item-hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.exif-icon {
    flex-shrink: 0;
    width: var(--exif-icon-size);
    height: var(--exif-icon-size);
    background: linear-gradient(135deg, #FFE500 0%, #FFC700 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.exif-icon-svg {
    width: 100%;
    height: 100%;
    color: #333;
    stroke: none;
}

.exif-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.exif-title {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
}

.exif-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #666;
    flex-wrap: wrap;
}

.exif-date,
.exif-type {
    display: inline-flex;
    align-items: center;
}

.exif-date::before {
    content: "";
    margin-right: 5px;
}

.exif-type {
    background: #e8e8e8;
    padding: 4px 12px;
    border-radius: 14px;
    font-size: 12px;
    white-space: nowrap;
}

.exif-date {
    gap: 6px;
}

.exif-date::before {
    content: "";
    width: 14px;
    height: 14px;
    margin-right: 0;
    background: #64748b;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 2v2H5a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-2V2h-2v2H9V2H7zm12 17H5V9h14v10z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 2v2H5a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-2V2h-2v2H9V2H7zm12 17H5V9h14v10z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.exif-excerpt {
    flex: 1;
    margin-bottom: 12px;
    color: #555;
    line-height: 1.5;
    font-size: 14px;
}

.exif-excerpt p {
    margin: 0;
}

.exif-btn {
    align-self: flex-start;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: inherit;
}

.exif-btn:hover {
    opacity: 0.9;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.exif-btn:active {
    transform: scale(0.98);
}

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

/* Modal Styles */
.exif-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.68);
    backdrop-filter: blur(4px);
    animation: exif-fadeIn 0.3s ease;
}

.exif-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes exif-fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.exif-modal-content {
    background-color: white;
    padding: 32px;
    border-radius: var(--exif-border-radius);
    max-width: 640px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: exif-slideIn 0.38s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

@keyframes exif-slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.exif-close {
    position: absolute;
    right: 20px;
    top: 20px;
    width: 34px;
    height: 34px;
    font-size: 25px;
    font-weight: 400;
    color: #64748b;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
    padding: 0 0 2px;
    background: none;
    border: none;
    border-radius: 50%;
}

.exif-close:hover {
    color: #0f172a;
    background: #f1f5f9;
    transform: rotate(90deg);
}

/* Detail View */
.exif-detail h2 {
    margin-top: 0;
    margin-bottom: 22px;
    color: #000;
    font-size: 30px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: 0;
    overflow-wrap: anywhere;
    padding-right: 28px;
}

.exif-meta-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 104px;
    color: #334155;
}

.exif-meta-label svg {
    display: block;
    width: 16px !important;
    height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
    flex: 0 0 16px;
    fill: #64748b;
    flex-shrink: 0;
}

.exif-detail-meta svg {
    vertical-align: middle;
}

.exif-detail-meta {
    background: #f8fafc;
    padding: 14px 16px;
    border-radius: 5px;
    margin-bottom: 22px;
    border-left: 4px solid #FFE500;
}

.exif-detail-meta p {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0;
    font-size: 14px;
    color: #666;
}

.exif-detail-meta strong {
    color: #333;
}

.exif-detail-content {
    line-height: 1.7;
    color: #333;
    font-size: 15px;
}

.exif-detail-content p {
    margin-bottom: 15px;
}

.exif-detail-content h3 {
    margin-top: 20px;
    margin-bottom: 10px;
    color: #000;
}

.exif-detail-content ul,
.exif-detail-content ol {
    margin-bottom: 15px;
    padding-left: 20px;
}

.exif-detail-content li {
    margin-bottom: 8px;
}

.exif-detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 15px 0;
}

.exif-modal-loading,
.exif-modal-error {
    padding: 24px 12px;
    text-align: center;
    color: #64748b;
}

.exif-modal-loading::before {
    content: "";
    display: block;
    width: 24px;
    height: 24px;
    margin: 0 auto 10px;
    border: 3px solid #e2e8f0;
    border-top-color: #22a861;
    border-radius: 50%;
    animation: exif-spin 0.75s linear infinite;
}

.exif-modal-error {
    color: #b42318;
    background: #fff4f2;
    border-radius: 6px;
}

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

/* Responsive */
@media (max-width: 768px) {
    .exif-layout-grid .exif-container {
        grid-template-columns: 1fr;
    }
    
    .exif-item {
        flex-direction: column;
    }
    
    .exif-icon {
        width: 50px;
        height: 50px;
        align-self: flex-start;
    }
    
    .exif-modal-content {
        width: 95%;
        padding: 24px 20px;
    }

    .exif-detail h2 {
        font-size: 24px;
        margin-bottom: 18px;
    }

    .exif-detail-meta p {
        align-items: flex-start;
        flex-wrap: wrap;
    }
    
    .exif-close {
        right: 10px;
        top: 10px;
        font-size: 24px;
    }
    
    .exif-meta {
        flex-direction: column;
        gap: 8px;
    }
}

/* Print Styles */
@media print {
    .exif-btn,
    .exif-close,
    .exif-modal {
        display: none !important;
    }
    
    .exif-item {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* Accessibility */
.exif-btn:focus,
.exif-close:focus {
    outline: 2px solid #FFE500;
    outline-offset: 2px;
}

/* Loading state */
.exif-modal-body-loading {
    text-align: center;
    padding: 20px;
    color: #666;
}