/* Custom styles */
.card {
    transition: transform 0.2s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.card:hover {
    transform: translateY(-5px);
}

.navbar-brand {
    font-weight: bold;
}

.form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.btn-primary {
    padding: 0.5rem 2rem;
}

.loading {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
}

.preview-container {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 0.375rem;
}

/* Dark theme for SweetAlert */
.dark-mode .swal2-popup {
    background: #1e1e1e !important;
    color: #ffffff !important;
}

.dark-mode .swal2-title {
    color: #ffffff !important;
}

.dark-mode .swal2-html-container {
    color: #ffffff !important;
}

.dark-mode .swal2-success-line-tip,
.dark-mode .swal2-success-line-long {
    background-color: #28a745 !important;
}

.dark-mode .swal2-success-ring {
    border-color: #28a745 !important;
}

.dark-mode .swal2-confirm {
    background-color: #0d6efd !important;
}

.dark-mode .swal2-cancel {
    background-color: #6c757d !important;
}

.dark-mode ul {
    padding-left: 20px;
    margin-bottom: 1rem;
}

.dark-mode li {
    margin-bottom: 0.5rem;
    color: #ffffff;
}

/* Custom OK button style */
.swal2-confirm.swal2-styled {
    border-radius: 20px;
    font-weight: 500;
    padding: 8px 24px;
    background-color: #00b4d8 !important;
}

/* Dark theme for preview modal */
.modal-content.bg-dark {
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.preview-info {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 0.5rem;
}

.preview-info ul {
    margin-bottom: 0;
}

.preview-info li {
    margin-bottom: 0.5rem;
}

.preview-pages {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.page-preview {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 0.5rem;
    text-align: center;
}

.page-preview img {
    max-width: 100%;
    height: auto;
    border-radius: 0.25rem;
    margin-bottom: 0.5rem;
}

.page-number {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

.preview-txt {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
}

.preview-txt pre {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    white-space: pre-wrap;
}

/* Cost breakdown styles */
.cost-breakdown {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
}

.cost-breakdown table {
    width: 100%;
    margin-bottom: 0;
}

.cost-breakdown th,
.cost-breakdown td {
    padding: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.cost-breakdown tr:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.total-cost {
    font-weight: bold;
    font-size: 1.1em;
}

/* Modal footer buttons */
.modal-footer .btn-secondary {
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
}

.modal-footer .btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.modal-footer .btn-primary {
    background-color: #0d6efd;
    border: none;
}

.modal-footer .btn-primary:hover {
    background-color: #0b5ed7;
}
