/* AGM Register Styling */

.page-title-action {
    display: inline-block;
    margin-bottom: 10px;
    padding: 8px 15px;
    background: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 3px;
}

.page-title-action:hover {
    background: #005a87;
}

#agm-register {
    max-width: 960px;
    margin: 0 auto;
    text-align: center;
    padding: 20px;
}

#agm-register h2 {
    font-size: 32px;
    margin-bottom: 20px;
    font-weight: bold;
    color: #333;
}

/* Quorum Status Bar */
.agm-quorum-status {
    background: #f9f9f9;
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.agm-quorum-counts {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 12px;
}

.agm-quorum-bar-track {
    position: relative;
    height: 30px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: visible;
    margin-bottom: 12px;
}

.agm-quorum-bar-fill {
    height: 100%;
    border-radius: 15px;
    transition: width 0.5s ease, background-color 0.5s ease;
    background-color: #dc3545;
}

.agm-quorum-bar-fill.quorum-met {
    background-color: #28a745;
}

.agm-quorum-marker {
    position: absolute;
    top: -4px;
    width: 3px;
    height: 38px;
    background: #333;
    transition: left 0.3s ease;
}

.agm-quorum-marker::after {
    content: 'Quorum';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    color: #666;
    white-space: nowrap;
}

.agm-quorum-label {
    font-size: 20px;
    font-weight: bold;
}

.agm-quorum-not-met {
    color: #dc3545;
}

.agm-quorum-met {
    color: #28a745;
}

/* Quorum Warning Banner */
.agm-quorum-warning {
    background: #f8d7da;
    border: 2px solid #dc3545;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    color: #721c24;
}

.agm-instructions {
    background: #e7f3ff;
    border: 2px solid #0073aa;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
    text-align: left;
}

.agm-instructions p {
    font-size: 20px;
    margin: 8px 0;
    color: #333;
}

#agm-search-input {
    width: 100%;
    padding: 15px 20px;
    font-size: 20px;
    border: 2px solid #ccc;
    border-radius: 8px;
    box-sizing: border-box;
    margin-bottom: 25px;
    transition: border-color 0.3s ease;
}

#agm-search-input:focus {
    border-color: #0073aa;
    outline: none;
}

#agm-search-results {
    margin-top: 20px;
    text-align: left;
}

.agm-result-card {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    font-size: 20px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.05);
}

.agm-result-card strong {
    font-size: 22px;
    display: block;
    margin-bottom: 10px;
    color: #222;
}

.agm-select-button {
    background-color: #28a745; /* Green */
    color: #fff;
    border: none;
    padding: 12px 25px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.agm-select-button:hover {
    background-color: #218838; /* Darker green on hover */
}

.agm-select-button.attended {
    background-color: #dc3545; /* Red for already attended */
    cursor: not-allowed;
    opacity: 0.8;
}

/* New - Styling when manually selected */
.agm-select-button.selected-now {
    background-color: #dc3545;
    cursor: not-allowed;
    opacity: 1;
}

/* Submit Button: Mark Selected */
#agm-mark-attendance {
    display: block;
    width: 100%;
    background-color: #0073aa; /* WordPress Blue */
    color: #ffffff;
    font-size: 22px;
    font-weight: bold;
    padding: 18px;
    margin-top: 30px;
    margin-bottom: 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#agm-mark-attendance:hover {
    background-color: #005177;
}

#agm-mark-attendance:active {
    background-color: #003d59;
}

/* Reset Button */
#agm-reset-search {
    display: block;
    width: 100%;
    background-color: #6c757d; /* Bootstrap Secondary Gray */
    color: #ffffff;
    font-size: 20px;
    font-weight: bold;
    padding: 16px;
    margin-bottom: 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#agm-reset-search:hover {
    background-color: #5a6268;
}

#agm-reset-search:active {
    background-color: #444c51;
}

/* Reset Attendance Button */
.agm-reset-attendance-button {
    background-color: #dc3545;
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.agm-reset-attendance-button:hover {
    background-color: #c82333;
}

.agm-reset-attendance-button:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

/* Apologies Button */
.agm-apologies-button {
    background-color: #ffc107;
    color: #333;
    border: none;
    padding: 12px 25px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 6px;
    margin-left: 10px;
    transition: background-color 0.3s ease;
}

.agm-apologies-button:hover {
    background-color: #e0a800;
}

.agm-apologies-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Status Labels in Search Results */
.agm-status-label {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    margin-left: 10px;
}

.agm-status-attended {
    background: #d4edda;
    color: #155724;
}

.agm-status-apologies {
    background: #fff3cd;
    color: #856404;
}

/* Next Member Prompt */
.agm-next-prompt {
    text-align: center;
    margin-top: 25px;
    padding: 20px;
}

.agm-next-button {
    background-color: #0073aa;
    color: #ffffff;
    font-size: 22px;
    font-weight: bold;
    padding: 18px 40px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.agm-next-button:hover {
    background-color: #005177;
}

/* Responsive for iPads and mobiles */
@media (max-width: 600px) {
    #agm-register {
        padding: 10px;
    }

    #agm-search-input {
        font-size: 18px;
    }

    .agm-select-button {
        width: 100%;
        margin-top: 10px;
    }

    #agm-mark-attendance,
    #agm-reset-search {
        font-size: 20px;
    }
}
