/* ========== VOTING STYLING ========== */

.mahsuri-form {
    background-color: #ffffff;
    border-radius: 20px;
    margin: auto auto 40px;
    max-width: 1200px;
    padding: 50px;
}

.mahsuri-form .form-group {
    margin: 0 0 15px;
}

.mahsuri-form label {
    color: #c03733;
    font-weight: 600;
    margin: 0 0 5px;
}

.mahsuri-form label small {
    color: #000000;
}

.mahsuri-form .form-group input {
    border: none;
    border-bottom: 2px solid #000;
    border-radius: 0;
    font-size: 18px;
    width: 100%;
}

.mahsuri-form .form-group input:focus {
    outline: none;
}

.mahsuri-form .mid-col {
    align-items: flex-start;
    display: flex;
    flex-direction: row;
    gap: 15px;
    justify-content: space-evenly;
}

.mahsuri-form .mid-col div {
    width: 100%;
}

.mahsuri-form .mid-col div input {
    width: 100%;
}

.mahsuri-form p {
    font-size: 12px;
    margin: 0;
}

.mahsuri-form p.instruction {
    margin: 0 0 10px;
}

.mahsuri-form h3 {
    color: #c03733;
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 5px;
}

.radio-boxes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.radio-box {
    position: relative;
    cursor: pointer;
    margin: 0;
}

.radio-box input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-box-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    padding: 5px 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: #fff;
    transition: all 0.3s ease;
}

.radio-box-number {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 0;
}

.radio-box-text {
    font-size: 14px;
    color: #666;
}

/* When radio is checked */
.radio-box input[type="radio"]:checked + .radio-box-content {
    border-color: #c03733;
    background: #c03733;
}

.radio-box input[type="radio"]:checked + .radio-box-content .radio-box-number {
    color: #ffffff;
    margin: 0;
}

/* Hover effect */
.radio-box:hover .radio-box-content {
    border-color: #c03733;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

input::placeholder,
textarea::placeholder {
    color: #d3d3d3;
    opacity: 1; /* Firefox requires this */
}

/* Checkbox Grid - 3 columns on desktop */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

/* Checkbox Box Styling */
.checkbox-box {
    position: relative;
    cursor: pointer;
    display: block;
    margin: 0;
}

.checkbox-box input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkbox-box-content {
    border: 3px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #d3d3d3;
    position: relative;
    height: 100%;
}

/* Image styling */
.checkbox-box-content img {
    width: 100%;
    object-fit: cover;
    display: block;
    position: relative;
    transition: opacity 0.3s ease;
    z-index: 2;
}

/* Grey overlay on the whole box - shown by default */
.checkbox-box-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #d3d3d39e;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 3;
}

/* Remove grey overlay when unlocked */
.checkbox-grid.unlocked .checkbox-box-content::before {
    opacity: 0;
}

/* Gradient overlay for WHOLE BOX when checked */
.checkbox-box input[type="checkbox"]:checked + .checkbox-box-content::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, #701e1a, #db4f34);
    opacity: 0.85;
    pointer-events: none;
    z-index: 1;
    transition: opacity 0.3s ease;
}

/* Label Text Area */
.checkbox-label-text {
    padding: 10px;
    text-align: center;
    z-index: 2;
}

.source-name {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    display: block;
    position: relative;
    z-index: 2;
}

/* White text when selected (on gradient background) */
.checkbox-box
    input[type="checkbox"]:checked
    + .checkbox-box-content
    .source-name {
    color: #fff;
}

/* Empty Radio Button on Top Right - Default State */
.checkmark {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: #fff;
    border: 3px solid #c03733;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Hide checkmark icon by default */
.checkmark::after {
    content: "✓";
    font-size: 18px;
    color: #2f7023;
    font-weight: 900;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-family: Arial, sans-serif; /* Rounder font */
    line-height: 1;
}

/* When checked - show GREEN checkmark */
.checkbox-box
    input[type="checkbox"]:checked
    + .checkbox-box-content
    .checkmark {
    background: #85dd76;
    border-color: #fff;
}

.checkbox-box
    input[type="checkbox"]:checked
    + .checkbox-box-content
    .checkmark::after {
    opacity: 1;
}

/* Red border when checked */
.checkbox-box input[type="checkbox"]:checked + .checkbox-box-content {
    border-color: #db4f34;
}

/* Hover effect - Red theme */
.checkbox-box:hover .checkbox-box-content {
    border-color: #db4f34;
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(219, 79, 52, 0.3);
}

/* Hover on checkmark */
.checkbox-box:hover .checkmark {
    border-color: #db4f34;
}

/* Disable pointer events when locked (before selecting numbol-beli) */
.checkbox-grid:not(.unlocked) .checkbox-box {
    cursor: not-allowed;
}

.checkbox-grid:not(.unlocked) .checkbox-box input {
    pointer-events: none;
}

/* Hide radio button when grid is locked */
.checkbox-grid:not(.unlocked) .checkmark {
    z-index: 2;
}

/* Show radio button when unlocked */
.checkbox-grid.unlocked .checkmark {
    display: flex;
}

div#source-error {
    background-color: #c03733;
    border-radius: 5px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    margin: 10px auto;
    padding: 5px 10px;
    text-align: center;
}

.msg-box .modal-dialog {
    max-width: 1000px;
    width: 100%;
}

/* .msg-box .modal-content {
    background-color: unset;
    background-clip: unset;
    background-image: url("../images/popup-message-bg.png");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    border: unset;
    border-radius: 20px;
    position: relative;
} */

.msg-box .modal-content {
    background-color: unset;
    background-clip: unset;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    border: none;
}

.msg-box .modal-content::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url(../images/popup-message-bg.png) center/cover no-repeat;
    transform: unset; /* adjust rotation angle here */
    transform-origin: center;
    z-index: 0;
}

.msg-box .modal-content .modal-body {
    padding: 50px 10px;
}

.msg-box .modal-content button.btn-close {
    background-color: #ffffff;
    border-radius: 20px;
    font-size: 15px;
    opacity: 1;
    padding: 7px;
    position: absolute;
    right: 10px;
    top: 10px;
}

.msg-box .msg-container {
    align-items: center;
    display: flex;
    flex-direction: row;
}

.msg-box .msg-container .msg-image {
    text-align: left;
}

.msg-box .msg-container .msg-image img {
    margin: auto;
    max-width: 90%;
}

.msg-box .msg-title h2 {
    color: #ffffff;
    font-size: 30px;
}

.msg-box .msg-content p {
    color: #ffffff;
    font-size: 22px;
}

.msg-box button.back-to-home {
    background: linear-gradient(180deg, #fee926 -35%, #db4f34 44%, #701e1a);
    border: none;
    border-radius: 50px;
    color: #ffffff;
    cursor: pointer;
    font-family: "Gotham", sans-serif;
    font-size: 18px;
    font-weight: 600;
    margin: 20px 0 0;
    max-width: 100%;
    padding: 10px 30px;
    text-transform: uppercase;
    width: 100%;
}

.check-tnc {
    margin: auto auto 20px !important;
    max-width: 90%;
    text-align: center;
}

.check-tnc span {
	color: #000;
    font-size: 14px;
}

.vote-form-submit {
    text-align: center;
}

.vote-form-submit button {
    background: linear-gradient(180deg, #fee926 -35%, #db4f34 44%, #701e1a);
    border: none;
    border-radius: 50px;
    color: #ffffff;
    font-weight: 600;
    max-width: 250px;
    padding: 15px 20px;
    text-transform: uppercase;
    width: 100%;
}

/* Submit Button */
.submit-button {
    background: #db4f34;
    color: #fff;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-button:hover:not(:disabled) {
    background: #c03733;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(219, 79, 52, 0.4);
}

.submit-button:active:not(:disabled) {
    transform: translateY(0);
}

/* Disabled state */
.submit-button:disabled {
    background: #ccc;
    color: #888;
    cursor: not-allowed;
    opacity: 0.6;
}

.submit-button:disabled:hover {
    transform: none;
    box-shadow: none;
}

@media (max-width: 1024px) {
    .checkbox-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 991px) {
    .mahsuri-form {
        padding: 30px;
    }

    .msg-box .modal-dialog {
        max-width: 90%;
    }

    .msg-box .msg-container .msg-image img {
        max-width: 85%;
    }

    .msg-box .msg-content p {
        font-size: 18px;
    }

    .msg-box button.back-to-home {
        font-size: 16px;
    }
}

/* Tablet - 2 columns */
@media (max-width: 768px) {
    .checkbox-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
	
	.msg-box .modal-content .modal-body {
		padding: 30px;
	}
	
	.msg-box .modal-dialog {
		margin: auto;
        max-width: 370px;
    }

    .msg-box .msg-title h2 {
        font-size: 24px;
    }

    .msg-box .modal-content::before {
        background: url(../images/popup-message-bg.png) 19% 100% / 150% 110%
            no-repeat;
        transform: rotate(90deg);
    }

    .msg-box .msg-container {
        flex-direction: column;
    }

    .msg-box .msg-container .msg-image {
        text-align: center;
    }
}

/* Mobile - 2 columns */
@media (max-width: 500px) {
    .checkbox-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
	
	.mahsuri-form .mid-col {
		flex-direction: column;
		gap: unset;
	}
}
