/**
 * Amendments Modal Styles
 * Using #amendment-modal prefix to avoid conflicts with other modals
 */

.amendments-section {
    margin: 40px auto;
    max-width: 800px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
}

/* Modal overlay */
#amendment-modal.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Modal content box */
#amendment-modal .modal-content {
    background-color: #fefefe;
    margin: 3% auto;
    padding: 0;
    border: 1px solid #888;
    border-radius: 8px;
    width: 90%;
    max-width: 700px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Modal header with close button */
#amendment-modal .modal-content h2 {
    margin: 0;
    padding: 20px 30px;
    background: #0A6DEF;
    color: white;
    border-radius: 8px 8px 0 0;
    font-size: 24px;
}

/* Close button */
#amendment-modal .modal-content .close {
    position: absolute;
    right: 15px;
    top: 15px;
    color: white;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    transition: all 0.2s ease;
    border-radius: 4px;
}

#amendment-modal .modal-content .close:hover,
#amendment-modal .modal-content .close:focus {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Modal form content */
#amendment-modal .modal-content form {
    padding: 30px;
}

/* Form groups */
#amendment-modal .form-group {
    margin-bottom: 20px;
}

#amendment-modal .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

#amendment-modal .form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 13px;
    font-style: italic;
}

/* Form controls */
#amendment-modal .form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

#amendment-modal .form-control:focus {
    outline: none;
    border-color: #0A6DEF;
    box-shadow: 0 0 0 3px rgba(10, 109, 239, 0.1);
}

#amendment-modal select.form-control {
    cursor: pointer;
    background-color: white;
}

#amendment-modal textarea.form-control {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

/* Checkboxes */
#amendment-modal .form-group label input[type="checkbox"],
#amendment-modal .form-group label input[type="radio"] {
    margin-right: 8px;
    cursor: pointer;
}

#amendment-modal .form-group label:has(input[type="checkbox"]),
#amendment-modal .form-group label:has(input[type="radio"]) {
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
}

/* Nested options (shown when checkbox is checked) */
#amendment-modal .form-group>div[style*="margin-left"] {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    border-left: 3px solid #0A6DEF;
}

/* Section headers in form */
#amendment-modal .modal-content h3 {
    font-size: 18px;
    color: #333;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

#amendment-modal .modal-content p {
    color: #666;
    font-size: 14px;
    margin: 0 0 15px 0;
}

/* Button group */
#amendment-modal .modal-content form>div[style*="flex"] {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

/* Buttons */
#amendment-modal .btn {
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

#amendment-modal .btn-primary {
    background: #0A6DEF;
    color: white;
}

#amendment-modal .btn-primary:hover {
    background: #0856c5;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(10, 109, 239, 0.3);
}

#amendment-modal .btn-secondary {
    background: #6c757d;
    color: white;
}

#amendment-modal .btn-secondary:hover {
    background: #5a6268;
}

/* Radio button group */
#amendment-modal .form-group label input[type="radio"]+* {
    margin-left: 5px;
}

/* Make sure modal shows above everything */
#amendment-modal[style*="display: block"] {
    display: block !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #amendment-modal .modal-content {
        width: 95%;
        margin: 5% auto;
    }

    #amendment-modal .modal-content form {
        padding: 20px;
    }

    #amendment-modal .modal-content h2 {
        padding: 15px 20px;
        font-size: 20px;
    }
}