/**
 * Public-facing styles
 *
 * @package    AgileIndicators
 * @subpackage Public
 */

.agileindicators-form {
    max-width: 600px;
    margin: 20px 0;
}

.agileindicators-form p,
.agileindicators-form .field-group {
    margin-bottom: 15px;
}

.features-columns {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.features-column {
    width: 48%;
}

.features-column h4 {
    margin-top: 0;
    margin-bottom: 10px;
}

.features-column label {
    display: block;
    margin-bottom: 5px;
    font-weight: normal;
}

.agileindicators-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.agileindicators-form input[type="text"],
.agileindicators-form input[type="email"],
.agileindicators-form input[type="number"],
.agileindicators-form input[type="date"],
.agileindicators-form input[type="password"],
.agileindicators-form select,
.agileindicators-form textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.agileindicators-form .required {
    color: #d63638;
}

.agileindicators-success {
    background-color: #00a32a;
    color: #fff;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.agileindicators-redirect-message {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.agileindicators-redirect-message p {
    margin: 10px 0;
    font-size: 1.1rem;
}

.agileindicators-redirect-message #countdown {
    display: inline-block;
    font-size: 1.5rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 15px;
    border-radius: 50%;
    min-width: 40px;
}

.agile-action-buttons {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.agile-action-buttons .button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px !important;
    height: auto !important;
    font-weight: 600;
}

/* Dynamic Forms */
.dynamic-request-form .form-field-wrapper {
    margin-bottom: 20px;
}

.dynamic-request-form .checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    cursor: pointer;
}

.dynamic-request-form .checkbox-label input[type="checkbox"] {
    margin: 0;
}

.dynamic-request-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.agileindicators-error {
    background-color: #d63638;
    color: #fff;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.agileindicators-dashboard {
    margin: 20px 0;
}

.agileindicators-dashboard .dashboard-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 4px;
}

.agileindicators-dashboard h3 {
    margin-top: 0;
}

.equipment-list,
.request-list,
.bids-list {
    list-style: none;
    padding: 0;
}

.equipment-list li,
.request-list li,
.bids-list li {
    padding: 10px;
    margin-bottom: 10px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.equipment-photos {
    margin-bottom: 20px;
}

.equipment-photos img {
    margin-right: 10px;
    margin-bottom: 10px;
}

.request-details,
.equipment-details {
    margin-bottom: 20px;
}

.request-details p,
.equipment-details p {
    margin-bottom: 10px;
}

/* Single Page Card Styles */
.agile-single-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 30px;
}

.agile-single-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border-bottom: 4px solid #ddd;
}

.agile-single-header.status-open {
    border-bottom-color: #27ae60;
}

.agile-single-header.status-bidding {
    border-bottom-color: #3498db;
}

.agile-single-header.status-pending {
    border-bottom-color: #f1c40f;
}

.agile-single-header.status-closed {
    border-bottom-color: #7f8c8d;
}

.agile-single-header.status-accepted {
    border-bottom-color: #27ae60;
}

.agile-single-title {
    margin: 0;
    font-size: 1.5rem;
    color: #2c3e50;
}

.agile-single-body {
    padding: 30px;
}

.agile-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 1.05rem;
    font-weight: 600;
    color: #2c3e50;
}

.agile-specs-section {
    margin-top: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.agile-specs-section h3 {
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    color: #2c3e50;
}

.agile-action-section {
    margin-top: 30px;
    padding: 25px 30px;
    background: #f8f9fa;
    border-radius: 8px;
}

.agile-action-section h3 {
    margin: 0 0 20px 0;
    font-size: 1.15rem;
    color: #2c3e50;
}

.bid-section,
.bids-section {
    margin-top: 30px;
    padding: 25px;
    background: #f9f9f9;
    border-radius: 8px;
}

.accept-bid,
.reject-bid {
    margin-left: 10px;
}

/* Request Card Redesign */
.agile-request-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin: 25px 0;
}

.agile-request-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    border-top: 4px solid #ddd;
}

.agile-request-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.agile-request-card.status-open {
    border-top-color: #27ae60;
}

.agile-request-card.status-bidding {
    border-top-color: #3498db;
}

.agile-request-card.status-pending {
    border-top-color: #f1c40f;
}

.agile-request-card.status-closed {
    border-top-color: #7f8c8d;
}

.agile-request-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.agile-request-card .card-title {
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.4;
}

.agile-request-card .card-title a {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 700;
}

.agile-request-card .card-status {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 50px;
    letter-spacing: 0.5px;
}

.agile-request-card.status-open .card-status {
    background: #eafaf1;
    color: #27ae60;
}

.agile-request-card.status-bidding .card-status {
    background: #ebf5fb;
    color: #3498db;
}

.agile-request-card.status-pending .card-status {
    background: #fef9e7;
    color: #f1c40f;
}

.agile-request-card.status-closed .card-status {
    background: #f2f4f4;
    color: #7f8c8d;
}

.agile-request-card.status-accepted .card-status {
    background: #eafaf1;
    color: #27ae60;
}

.agile-request-card.status-rejected .card-status {
    background: #fdedec;
    color: #e74c3c;
}

/* Status Bar Color Overrides */
.agile-request-card.status-accepted {
    border-top-color: #27ae60;
}

.agile-request-card.status-rejected {
    border-top-color: #e74c3c;
}

.agile-request-card .card-body {
    flex-grow: 1;
    margin-bottom: 20px;
}

.agile-request-card .card-detail {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    padding: 6px 0;
    border-bottom: 1px solid #f8f9fa;
}

.agile-request-card .card-detail:last-child {
    border-bottom: none;
}

.agile-request-card .card-detail strong {
    color: #7f8c8d;
    font-weight: 600;
}

.agile-request-card .card-detail span {
    color: #2c3e50;
    font-weight: 500;
}

.agile-request-card .bid-price {
    color: #27ae60;
    font-weight: 700;
    font-size: 1.05rem;
}

.agile-request-card .card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #f2f4f4;
    gap: 10px;
}

.agile-status-label,
.card-status {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 50px;
    letter-spacing: 0.5px;
}

.edit-label {
    background: #fdf2e9;
    color: #e67e22;
    border: none;
    cursor: pointer;
}

.bid-actions {
    display: flex;
    gap: 8px;
    width: 100%;
}

.agile-button {
    flex: 1;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: background 0.2s;
    text-decoration: none;
}

.button-success {
    background: #27ae60;
    color: #fff;
}

.button-success:hover {
    background: #219150;
}

.button-danger {
    background: #e74c3c;
    color: #fff;
}

.button-danger:hover {
    background: #c0392b;
}

.button-secondary {
    background: #ecf0f1;
    color: #2c3e50;
}

.button-secondary:hover {
    background: #d5dbdb;
}

.agile-request-card .card-bids {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #3498db;
    font-weight: 600;
    font-size: 0.95rem;
}

.agile-request-card .card-bids i {
    font-size: 1.1rem;
}

.agile-request-card .card-action-link {
    background: #3498db;
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.2s;
}

.agile-request-card .card-action-link:hover {
    background: #2980b9;
}


/* Modal Styles */
.agileindicators-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    /* Always flex */
    justify-content: center;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.agileindicators-modal-overlay.active {
    visibility: visible;
    opacity: 1;
}

.agileindicators-modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    /* Leave margin top/bottom */
    overflow-y: auto;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.agileindicators-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    line-height: 1;
}

.agileindicators-modal-close:hover {
    color: #000;
}

.agileindicators-loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}