/* MEDYAJANS SISTEM - CLEAN MODAL STYLES */

/* Backup Modal Button Styles - Template CSS'ten taşındı */
.restore-btn {
    background: linear-gradient(135deg, #ff6b7a, #ff8a80);
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 8px;
}

.restore-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 122, 0.4);
}

.restore-btn:active {
    transform: translateY(0);
}

.delete-btn {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 8px;
}

.delete-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

.delete-btn:active {
    transform: translateY(0);
}

.backup-file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 8px;
    margin-bottom: 8px;
    border: 1px solid #334155;
}

.file-info {
    flex: 1;
}

.file-name {
    color: #e2e8f0;
    font-weight: 600;
    margin-bottom: 4px;
}

.file-details {
    color: #94a3b8;
    font-size: 0.8rem;
}

.file-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checksum-ok {
    color: #43e97b;
    font-weight: 600;
}

.checksum-missing {
    color: #ff6b7a;
    font-weight: 600;
}

.backup-type-section {
    margin-bottom: 25px;
}

.backup-type-section h4 {
    color: #4facfe;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #334155;
}

.no-backups {
    text-align: center;
    color: #94a3b8;
    padding: 40px;
    font-style: italic;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    z-index: 2000;
    display: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: opacity, backdrop-filter;
}

.modal-overlay.active {
    display: block;
    visibility: visible;
}

.modal-overlay.show {
    opacity: 1;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Modal Container */
.modal-container {
    background: linear-gradient(135deg, #1e1e2f 0%, #252545 100%);
    border: 1px solid #334155;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    width: 85%;
    max-width: 800px;
    min-width: 320px;
    max-height: 85vh;
    height: auto;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95) translateY(20px);
    opacity: 0;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform, opacity;
    z-index: 2001;
    overflow: hidden;
    visibility: hidden;
}

.modal-overlay.show .modal-container {
    transform: translate(-50%, -50%) scale(1) translateY(0px);
    opacity: 1;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    visibility: visible;
}

/* Modal Header */
.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid rgba(79, 172, 254, 0.3);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.modal-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #e2e8f0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #94a3b8;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(79, 172, 254, 0.1);
    color: #4facfe;
}

/* Modal Body */
.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 25px;
    width: 100%;
    box-sizing: border-box;
}

/* Form Grid Layout */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    width: 100%;
}

/* Modal Form - no cards, direct inputs */
.modal-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.form-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Form Cards */
.form-card {
    background: rgba(37, 37, 69, 0.4);
    border: 1px solid rgba(79, 172, 254, 0.2);
    border-radius: 12px;
    padding: 20px;
}

.form-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #4facfe;
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(79, 172, 254, 0.2);
}

/* Form Elements */
.form-group {
    margin-bottom: 16px;
    width: 100%;
    box-sizing: border-box;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 16px;
}

.form-row .form-group {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #e2e8f0;
    font-size: 0.9rem;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    background: #0f172a;
    border: 1px solid #334155;
    color: #e2e8f0;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.form-group select {
    cursor: pointer;
}

/* Input Addon (Subdomain) */
.input-addon {
    display: flex;
    align-items: center;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.input-addon:focus-within {
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

.input-addon input {
    border: none;
    background: transparent;
    flex: 1;
    margin: 0;
    box-shadow: none;
}

.input-addon input:focus {
    outline: none;
    border: none;
    box-shadow: none;
}

.input-addon .addon {
    background: rgba(79, 172, 254, 0.1);
    color: #4facfe;
    padding: 12px 14px;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* Logo Upload Area */
.logo-upload-area {
    text-align: center;
}

.logo-preview {
    width: 120px;
    height: 120px;
    border: 2px dashed rgba(79, 172, 254, 0.4);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(15, 23, 42, 0.3);
    position: relative;
    overflow: hidden;
}

.logo-preview:hover {
    border-color: rgba(79, 172, 254, 0.7);
    background: rgba(15, 23, 42, 0.5);
    transform: scale(1.05);
}

.logo-placeholder {
    text-align: center;
    color: #94a3b8;
    padding: 10px;
}

.logo-placeholder span {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 8px;
}

.logo-placeholder p {
    margin: 5px 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: #4facfe;
}

.logo-placeholder small {
    font-size: 0.75rem;
    color: #64748b;
    display: block;
    margin-top: 4px;
}

.logo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.logo-preview.has-image {
    border-style: solid;
    border-color: rgba(79, 172, 254, 0.6);
    background: rgba(79, 172, 254, 0.1);
}

/* Modal Footer */
.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid rgba(79, 172, 254, 0.3);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-shrink: 0;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary {
    background: #475569;
    color: #e2e8f0;
}

.btn-secondary:hover {
    background: #64748b;
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #0f172a;
    font-weight: 600;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.3);
}

/* Desktop large screens */
@media (min-width: 1200px) {
    .modal-form {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 25px;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
}

/* Responsive - Tablet */
@media (max-width: 1024px) {
    .modal-container {
        width: 92%;
        max-width: 650px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .modal-form {
        grid-template-columns: 1fr;
        gap: 18px;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .modal-container {
        width: 95%;
        max-width: 95%;
        max-height: 90vh;
        border-radius: 12px;
    }
    
    .modal-form {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .form-card {
        padding: 16px;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
        padding: 14px;
        justify-content: center;
    }
}

/* Scrollbar Styling - Performance Optimized */
.modal-body {
    scrollbar-width: thin;
    scrollbar-color: rgba(79, 172, 254, 0.4) transparent;
}

.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.modal-body::-webkit-scrollbar-thumb {
    background: rgba(79, 172, 254, 0.4);
    border-radius: 3px;
    transition: background-color 0.2s ease;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(79, 172, 254, 0.6);
}

/* Performance Optimizations */
.form-grid {
    transform: translateZ(0);
    will-change: scroll-position;
}

.form-card {
    contain: layout;
    transform: translateZ(0);
}