/* app/static/css/style.css */

body {
    background-color: #1a1a1a;
    color: #e0e0e0;
    font-family: 'Inter', sans-serif;
}

.tab-button {
    transition: all 0.3s ease;
}

.tab-button.active {
    background-color: #00bfff;
    color: #ffffff;
}

.tab-button:not(.active) {
    background-color: #2c2c2c;
    color: #a0a0a0;
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 40;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #252526;
    padding: 2rem;
    border-radius: 0.5rem;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.form-input,
.form-select {
    background-color: #2e2e2e;
    border: 1px solid #444;
    color: white;
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    width: 100%;
}

.btn {
    font-weight: bold;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s;
    cursor: pointer;
}

.btn-primary {
    background-color: #00bfff;
    color: white;
}

.btn-primary:hover {
    background-color: #33cfff;
}

.btn-danger {
    background-color: #e53e3e;
    color: white;
}

.btn-danger:hover {
    background-color: #fc8181;
}

.btn-secondary {
    background-color: #4a5568;
    color: white;
}

.btn-secondary:hover {
    background-color: #718096;
}

.btn-success {
    background-color: #38a169;
    color: white;
}

.btn-success:hover {
    background-color: #48bb78;
}

.btn-warning-custom {
    background-color: #FFC107;
    color: #212529;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

.btn-warning-custom:hover {
    background-color: #E0A800;
    transform: translateY(-1px);
}

.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
}

.btn-loading .spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    vertical-align: text-bottom;
    border: 0.15em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border .75s linear infinite;
    margin-right: 0.5rem;
}

@keyframes spinner-border {
    to { transform: rotate(360deg); }
}

.message-box {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
}

.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Offer Creator Specific Styles */
.offer-form-section {
    background-color: #252526;
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.offer-form-section label {
    color: #a0a0a0;
    font-weight: 600;
}

.offer-form-section .form-input,
.offer-form-section .form-select,
.offer-form-section textarea {
    background-color: #1a1a1a;
    border: 1px solid #444;
    color: #e0e0e0;
}

.offer-form-section .btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.offer-status-icon {
    font-size: 1.2em;
    margin-right: 5px;
}

.offer-article-tab-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .offer-article-tab-content {
        grid-template-columns: 1fr 1fr;
    }
}

.offer-listbox-container {
    height: 250px;
    overflow-y: auto;
    background-color: #1a1a1a;
    border: 1px solid #444;
    border-radius: 0.375rem;
}

.offer-listbox-item {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    color: #e0e0e0;
}

.offer-listbox-item:hover {
    background-color: #2c2c2c;
}

.offer-listbox-item.selected {
    background-color: #00bfff;
    color: #ffffff;
}

.offer-textarea {
    min-height: 80px;
    resize: vertical;
}

#offerTabsHeaderContainer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #444;
    padding-bottom: 0.5rem;
}

.offer-tab-header {
    padding: 0.5rem 0.8rem;
    font-size: 0.875rem;
    border-radius: 0.375rem 0.375rem 0 0;
    cursor: pointer;
    background-color: #2c2c2c;
    color: #a0a0a0;
    font-weight: 600;
    transition: background-color 0.2s, color 0.2s;
    border: 1px solid transparent;
    border-bottom: none;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.offer-tab-header .status-icon-on-tab {
    margin-left: 0.25rem;
    font-size: 1em;
}

.offer-tab-header:hover {
    background-color: #3a3a3a;
}

.offer-tab-header.active {
    background-color: #252526;
    color: #00bfff;
    border-color: #444;
    border-bottom-color: #252526;
}

#offerTabsContentContainer {
    position: relative;
    min-height: 300px;
}

.offer-article-form-tab-content {
    position: relative;
    background-color: #252526;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: none;
    width: 100%;
}

.offer-article-form-tab-content.active {
    display: block;
}