/**
 * Cathedral Info Guide - Modal Styles
 * Styles for the correction request modal.
 * Prefixed with .cig-modal- to ensure independence.
 */

/* Modal Overlay */
.cig-modal {
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.6); /* Black w/ opacity */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modal Content Box */
.cig-modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 25px 30px;
    border: 1px solid #888;
    width: 90%;
    max-width: 500px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19);
}

/* Close Button */
.cig-modal-close {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
}

.cig-modal-close:hover,
.cig-modal-close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Form Fields */
.cig-modal .cig-form-field {
    margin-bottom: 15px;
}

.cig-modal .cig-form-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.cig-modal .cig-form-field input[type="text"],
.cig-modal .cig-form-field textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Important */
}

.cig-modal .cig-form-field button.cig-cta-button {
    width: 100%;
    padding: 10px 15px;
    border: none;
}

/* Feedback messages */
#cig-modal-feedback.success {
    color: #28a745;
    font-weight: bold;
}

#cig-modal-feedback.error {
    color: #dc3545;
    font-weight: bold;
}

/**
 * =========================================================================
 * Single Church Page Layout
 * =========================================================================
 * Two-column layout for desktop screens.
 */
@media (min-width: 768px) {
    .cig-layout-container {
        display: flex;
        gap: 2.5em; /* Creates space between the columns */
        align-items: flex-start; /* Aligns items to the top */
    }

    .cig-layout-left {
        flex: 0 0 auto; /* Allow content to define width, but don't shrink */
        max-width: 400px; /* Optional: Add a max-width to prevent it from getting too wide on very large screens */
    }

    .cig-layout-right {
        flex-grow: 1; /* Allow this column to grow and take remaining space */
        min-width: 0; /* A key fix for flexbox to prevent content overflow */
    }

    /* Ensure image scales within its container */
    .cig-church-thumbnail img {
        max-width: 100%;
        height: auto;
        display: block; /* Remove extra space below image */
    }
}


/* Step6: File field spacing */
#cig-correction-form input[type="file"]{ margin-top: .25rem; }
#cig-modal-feedback.processing{ color:#555; }
#cig-modal-feedback.success{ color: #117a00; }
#cig-modal-feedback.error{ color: #b00020; }
