/* Global Input Field Text Color Override - WHITE for visibility */
/* This file ensures all input fields have visible white text color */

:root {
    --input-text-color: #ffffff; /* White for input text */
    --input-text-color-light: rgba(255, 255, 255, 0.9); /* Slightly transparent white */
}

/* Apply WHITE text to ALL input fields for visibility */
.form-input,
input.form-input,
textarea.form-input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
textarea {
    color: var(--input-text-color) !important;
    -webkit-text-fill-color: var(--input-text-color) !important;
}

/* Placeholder text - semi-transparent white */
.form-input::placeholder,
input::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.5) !important;
}

/* Focus state - maintain white */
.form-input:focus,
input:focus,
textarea:focus {
    color: var(--input-text-color) !important;
    -webkit-text-fill-color: var(--input-text-color) !important;
}

/* Search input in Dashboard sidebar */
.search-input {
    color: var(--input-text-color) !important;
    -webkit-text-fill-color: var(--input-text-color) !important;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.5) !important;
}

.search-input:focus {
    color: var(--input-text-color) !important;
    -webkit-text-fill-color: var(--input-text-color) !important;
}

/* Blazor InputText component override */
.valid.modified:not([type=checkbox]),
.invalid {
    color: var(--input-text-color) !important;
    -webkit-text-fill-color: var(--input-text-color) !important;
}

/* Code elements (username/password display) - WHITE text */
code {
    color: #ffffff !important;
}

/* ========================================
   DASHBOARD DETAIL VIEW CENTERING
   ======================================== */

/* Center the detail view container */
.content-area {
    flex: 1;
    padding: 0 32px 32px;
    overflow-y: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* Detail View Wrapper - Centered with max width */
.detail-view-wrapper {
    width: 100%;
    max-width: 900px;
    display: flex;
    justify-content: center;
}

.detail-view {
    width: 100%;
}

/* ========================================
   MODAL POSITIONING AND LAYOUT - GLASSY FROST THEME
   ======================================== */

/* Modal overlay - Full screen centered layout with frost effect */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 25, 41, 0.85);
    backdrop-filter: blur(12px) saturate(150%);
    -webkit-backdrop-filter: blur(12px) saturate(150%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 16px;
    overflow-y: auto;
    animation: overlayFadeIn 0.3s ease;
}

@keyframes overlayFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(12px) saturate(150%);
    }
}

/* Modal content - Compact glassy frost design */
.modal-content {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.18) 0%, 
        rgba(255, 255, 255, 0.14) 50%,
        rgba(255, 255, 255, 0.12) 100%);
    backdrop-filter: blur(40px) saturate(200%) brightness(1.2);
    -webkit-backdrop-filter: blur(40px) saturate(200%) brightness(1.2);
    border: 0.5px solid rgba(255, 255, 255, 0.35);
    border-radius: 16px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        0 0 80px rgba(129, 212, 250, 0.2),
        0 0 0 1px rgba(79, 195, 247, 0.1);
    max-width: 650px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin: auto;
    position: relative;
    animation: modalSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Frost shimmer effect on modal */
.modal-content::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(225, 245, 254, 0.05) 50%,
        transparent 70%
    );
    animation: modalShimmer 8s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes modalShimmer {
    0%, 100% { transform: translate(-50%, -50%) rotate(0deg); }
    50% { transform: translate(-50%, -50%) rotate(180deg); }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.92);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Modal header - Compact with frost styling */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.22) 0%, 
        rgba(255, 255, 255, 0.16) 100%);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    z-index: 10;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.3px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Modal body - Compact scrollable area */
.modal-body {
    padding: 16px 20px;
    overflow-y: auto;
    flex: 1;
    position: relative;
    z-index: 1;
}

/* Custom scrollbar for modal */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Modal footer - Compact with frost styling */
.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 12px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    position: sticky;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.22) 0%, 
        rgba(255, 255, 255, 0.16) 100%);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border-radius: 0 0 16px 16px;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

/* Compact form groups in modal */
.modal-body .form-group {
    margin-bottom: 14px;
}

.modal-body .form-label {
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.modal-body .form-input {
    padding: 10px 14px;
    font-size: 13px;
    border-radius: 8px;
}

.modal-body textarea.form-input {
    padding: 10px 14px;
    min-height: 70px;
}

/* Glass credential container - Compact */
.modal-body .glass {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
    backdrop-filter: blur(20px);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Compact buttons in modal */
.modal-body .btn,
.modal-footer .btn {
    padding: 9px 18px;
    font-size: 13px;
    border-radius: 8px;
    font-weight: 600;
}

.modal-footer .btn {
    min-width: 85px;
}

/* Secondary button styling for modal - Frost theme */
.btn-secondary {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(129, 212, 250, 0.2);
}

/* Danger button for modal */
.btn-danger {
    background: linear-gradient(135deg, 
        rgba(245, 87, 108, 0.25) 0%, 
        rgba(245, 87, 108, 0.35) 100%);
    border: 1px solid rgba(245, 87, 108, 0.4);
    color: #ffffff;
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background: linear-gradient(135deg, 
        rgba(245, 87, 108, 0.35) 0%, 
        rgba(245, 87, 108, 0.45) 100%);
    border-color: rgba(245, 87, 108, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.3);
}

/* Responsive modal - Mobile optimization */
@media (max-width: 768px) {
    .modal-overlay {
        padding: 12px;
    }

    .modal-content {
        max-width: 100%;
        max-height: 95vh;
        border-radius: 12px;
    }

    .modal-header {
        padding: 14px 16px;
        border-radius: 12px 12px 0 0;
    }

    .modal-title {
        font-size: 16px;
    }

    .modal-body {
        padding: 14px 16px;
    }

    .modal-footer {
        padding: 10px 16px;
        border-radius: 0 0 12px 12px;
        flex-wrap: wrap;
    }

    .modal-footer .btn {
        flex: 1;
        min-width: 0;
    }

    .modal-body .glass {
        padding: 10px;
    }

    .modal-body .form-group {
        margin-bottom: 12px;
    }

    .detail-view-container {
        max-width: 100%;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .modal-overlay {
        padding: 0;
    }

    .modal-content {
        max-height: 100vh;
        border-radius: 0;
    }

    .modal-header,
    .modal-footer {
        border-radius: 0;
    }

    .modal-title {
        font-size: 15px;
    }
}
