/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Content */
.modal-content {
    background: white;
    padding: 2.5rem;
    /* More spacing */
    border-radius: 16px;
    width: 95%;
    /* Wider on small screens */
    max-width: 650px;
    /* Increased max width for 2-col layout */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    text-align: center;
    font-family: 'Inter', sans-serif;
    max-height: 90vh;
    /* Prevent cut-off on small screens */
    overflow-y: auto;
    /* Allow scroll inside modal if needed */
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    margin-bottom: 2rem;
    text-align: left;
    /* Header aligned left looks better with forms */
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 1rem;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.25rem;
}

.modal-subtitle {
    font-size: 0.9rem;
    color: #6b7280;
}

/* Form Styles */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* Two columns */
    gap: 1.5rem;
    text-align: left;
}

/* Responsive Form Grid */
@media (max-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr;
        /* Single column on mobile */
        gap: 1rem;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-input {
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
    outline: none;
    width: 100%;
}

.form-input:focus {
    border-color: #3b82f6;
    /* Blue focus */
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Options/Buttons */
.options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
    width: 100%;
}

.option-btn {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    padding: 0.85rem;
    border-radius: 8px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.option-btn:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.option-btn.primary {
    background: #111827;
    /* Dark black/grey */
    color: white;
    border: 1px solid #000;
}

.option-btn.primary:hover {
    background: #000;
}

/* Result Area */
.result-area {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    margin-top: 1rem;
    text-align: left;
    word-break: break-all;
    font-family: monospace;
    font-size: 0.9rem;
}

.result-area.active {
    display: block;
}

.copy-actions {
    margin-top: 1rem;
    display: flex;
    justify-content: flex-end;
}

.copy-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.2s;
}

.copy-btn:hover {
    background: #2563eb;
}

.close-modal-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 1.5rem;
    transition: color 0.2s;
}

.close-modal-btn:hover {
    color: #111827;
}

.hidden {
    display: none !important;
}

/* Status Table */
.status-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    text-align: left;
    font-size: 0.95rem;
}

.status-table th,
.status-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.status-table th {
    font-weight: 600;
    color: #4b5563;
    width: 40%;
}

.status-table td {
    color: #111827;
    font-family: monospace;
    font-size: 1rem;
}

.status-table tr:last-child th,
.status-table tr:last-child td {
    border-bottom: none;
}