.leave-details-dialog {
    max-height: 90vh;
}

/* Dialog Title Styling */
.dialog-title-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0;
}

.dialog-title-content {
    display: flex;
    align-items: center;
    flex: 1;
}

.close-button {
    margin-left: auto;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.close-button:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.04);
}

.leave-details-content {
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 8px;
}

.request-header-mobile {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.request-info {
    flex: 1;
    min-width: 200px;
}

/* Desktop Layout */
.request-info-desktop {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.desktop-columns {
    display: flex;
    gap: 40px;
}

.column-left,
.column-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-item-desktop {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.info-item-desktop .info-label {
    min-width: 100px;
    font-weight: 600;
    color: var(--mud-palette-text-secondary);
    font-size: 0.875rem;
}

.info-item-desktop .info-value {
    flex: 1;
    font-weight: 500;
    color: var(--mud-palette-text-primary);
}

/* Mobile Layout (Hidden on Desktop) */
.mobile-column {
    display: none;
    flex-direction: column;
    gap: 16px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.half-width {
    flex: 1;
    min-width: 120px;
}

.info-label {
    font-weight: 600;
    color: var(--mud-palette-text-secondary);
    font-size: 0.875rem;
}

.info-value {
    font-weight: 500;
    color: var(--mud-palette-text-primary);
}

/* Reason Section - Full Width on Both Views */
.reason-item {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid var(--mud-palette-lines-default);
}

.reason-text {
    padding: 12px 16px;
    background-color: var(--mud-palette-background-gray);
    border-radius: 6px;
    border-left: 4px solid var(--mud-palette-primary);
    margin-top: 8px;
    font-style: italic;
}

.cc-recipients-mobile {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Documents Container - Responsive */
.documents-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.document-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 8px;
    background-color: var(--mud-palette-surface);
    transition: box-shadow 0.2s ease;
}

.document-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.document-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.document-details {
    flex: 1;
}

.document-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.document-info {
    font-size: 0.75rem;
    margin-bottom: 4px;
}

.document-note {
    font-size: 0.875rem;
    margin-bottom: 4px;
}

.preview-btn {
    flex-shrink: 0;
    margin-left: 8px;
}

.status-history-mobile {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dialog-actions-mobile {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
    width: 100%;
}

.action-btn {
    flex-shrink: 0;
}

/* Tablet View */
@media (max-width: 1024px) {
    .desktop-columns {
        gap: 24px;
    }
    
    .column-left,
    .column-right {
        gap: 12px;
    }
    
    .info-item-desktop {
        padding: 6px 0;
    }
    
    .info-item-desktop .info-label {
        min-width: 90px;
        font-size: 0.8125rem;
    }
}

/* Mobile-specific adjustments */
@media (max-width: 768px) {
    .leave-details-dialog {
        max-width: 95vw !important;
        margin: 8px;
    }

    .leave-details-content {
        max-height: 60vh;
        padding-right: 4px;
    }

    .request-header-mobile {
        flex-direction: column;
        align-items: stretch;
    }

    /* Hide Desktop Layout, Show Mobile Layout */
    .desktop-columns {
        display: none;
    }
    
    .mobile-column {
        display: flex;
    }

    .info-row {
        flex-direction: column;
        gap: 12px;
    }

    .half-width {
        min-width: unset;
    }

    .document-item {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .document-header {
        align-items: flex-start;
    }

    .preview-btn {
        align-self: flex-end;
        margin-left: 0;
    }

    .dialog-actions-mobile {
        justify-content: stretch;
    }

    .action-btn {
        flex: 1;
        min-width: 80px;
    }
    
    .reason-item {
        margin-top: 16px;
        padding-top: 16px;
    }

    /* Mobile title adjustments */
    .dialog-title-content {
        font-size: 1.1rem;
    }
    
    .close-button {
        min-width: 32px !important;
        height: 32px !important;
    }
}

@media (max-width: 480px) {
    .leave-details-dialog {
        max-width: 100vw !important;
        margin: 0;
        border-radius: 0 !important;
    }

    .leave-details-content {
        max-height: 65vh;
    }

    .info-label {
        font-size: 0.8125rem;
    }

    .info-value {
        font-size: 0.875rem;
    }
    
    .document-item {
        padding: 12px;
    }
    
    .reason-text {
        padding: 10px 12px;
    }

    .dialog-title-content {
        font-size: 1rem;
    }
}