/* AdOnDesk Survey Questionnaire - Frontend Styles */

/* ===== Survey Listing Page ===== */
.aodq-survey-listing-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.aodq-survey-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 20px;
}

.aodq-survey-header h2 {
    margin: 0;
    font-size: 28px;
    color: #333;
}

.aodq-survey-count {
    font-size: 16px;
    color: #666;
    margin: 0;
}

.aodq-survey-count strong {
    color: #0073aa;
    font-weight: 600;
}

/* Info Messages */
.aodq-info-msg {
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 15px;
}

.aodq-info-msg.aodq-info {
    background-color: #e7f3ff;
    border-left: 4px solid #0073aa;
    color: #003d82;
}

.aodq-info-msg.aodq-error {
    background-color: #fff5f5;
    border-left: 4px solid #dc3545;
    color: #721c24;
}

.aodq-info-msg a {
    color: inherit;
    text-decoration: underline;
    font-weight: 600;
}

/* ===== Survey Items Table ===== */
.aodq-survey-items-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.aodq-survey-items-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.aodq-survey-items-table thead {
    background-color: #f5f5f5;
    border-bottom: 2px solid #e0e0e0;
}

.aodq-survey-items-table thead th {
    padding: 15px 20px;
    text-align: left;
    font-weight: 600;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.aodq-survey-items-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.2s ease;
}

.aodq-survey-items-table tbody tr:hover {
    background-color: #f9f9f9;
}

.aodq-survey-items-table tbody td {
    padding: 15px 20px;
    vertical-align: middle;
}

.aodq-survey-title strong {
    display: block;
    font-size: 16px;
    color: #0073aa;
    margin-bottom: 5px;
}

.aodq-survey-purpose {
    font-size: 13px;
    color: #666;
    margin: 5px 0 0 0;
    font-style: italic;
}

.aodq-survey-date {
    color: #666;
    white-space: nowrap;
}

/* Status Badge */
.aodq-status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.aodq-status-pending {
    background-color: #ffeaa7;
    color: #8b6f00;
}

.aodq-status-completed {
    background-color: #55efc4;
    color: #006622;
}

.aodq-status-payed {
    background-color: #74b9ff;
    color: #003d82;
}

.aodq-status-not-payed {
    background-color: #ff7675;
    color: #d63031;
}

/* Progress Bar */
.aodq-progress-bar {
    width: 100%;
    height: 20px;
    background-color: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 5px;
}

.aodq-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0073aa, #0091cc);
    width: 0%;
    transition: width 0.3s ease;
}

.aodq-progress-text {
    font-size: 12px;
    color: #666;
    display: block;
}

/* Actions */
.aodq-survey-actions {
    text-align: center;
}

.aodq-btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.aodq-btn-primary {
    background-color: #0073aa;
    color: white;
}

.aodq-btn-primary:hover {
    background-color: #005a87;
    text-decoration: none;
    box-shadow: 0 2px 5px rgba(0, 115, 170, 0.3);
}

.aodq-btn-secondary {
    background-color: #f0f0f0;
    color: #333;
}

.aodq-btn-secondary:hover {
    background-color: #e0e0e0;
    text-decoration: none;
}

.aodq-btn.aodq-download-json.disabled {
    cursor: not-allowed;
}

/* ===== Pagination ===== */
.aodq-pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.aodq-page-link {
    display: inline-block;
    padding: 8px 12px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #0073aa;
    font-weight: 600;
    transition: all 0.2s ease;
}

.aodq-page-link:hover {
    background-color: #0073aa;
    color: white;
    border-color: #0073aa;
}

.aodq-page-link.current {
    background-color: #0073aa;
    color: white;
    border-color: #0073aa;
}

/* ===== Survey Detail Page ===== */
.aodq-survey-detail-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.aodq-detail-header {
    margin-bottom: 30px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.aodq-back-link {
    display: inline-block;
    color: #0073aa;
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 15px;
    transition: color 0.2s ease;
}

.aodq-back-link:hover {
    color: #005a87;
}

.aodq-detail-header h2 {
    margin: 0;
    padding: 0;
    font-size: 28px;
    color: #333;
}

.aodq-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(calc(50% - 10px), 1fr));
    gap: 20px;
    margin-top: 20px;
}

.aodq-detail-grid .full-width {
    grid-column: 1 / -1;
}

.aodq-detail-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.aodq-detail-section h3 {
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    font-size: 18px;
    color: #333;
}

.aodq-info-row {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
}

.aodq-info-row:last-child {
    border-bottom: none;
}

.aodq-info-row label {
    font-weight: 600;
    color: #666;
    min-width: 150px;
    margin-right: 15px;
}

.aodq-info-row span {
    color: #333;
    flex: 1;
}

.aodq-survey-detail-wrapper span.aodq-status-badge.aodq-status-pending {
    max-width: 30%;
    text-align: center;
}

.aodq-survey-purpose p {
    margin: 0;
    color: #666;
    line-height: 1.6;
}

/* Questions Section */
.aodq-questions-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.aodq-question-item {
    padding: 15px;
    background-color: #f9f9f9;
    border-left: 4px solid #0073aa;
    border-radius: 4px;
}

.aodq-question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    gap: 15px;
}

.aodq-question-header h4 {
    margin: 0;
    color: #333;
    font-size: 14px;
}

.aodq-question-status {
    display: inline-block;
    padding: 4px 8px;
    background-color: #e7f3ff;
    color: #0073aa;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.aodq-question-text {
    margin-bottom: 10px;
    padding: 10px;
    background-color: white;
    border-radius: 4px;
    color: #333;
}

.aodq-question-text strong {
    display: block;
    margin-bottom: 5px;
    color: #0073aa;
}

.aodq-question-options {
    padding: 10px;
    background-color: white;
    border-radius: 4px;
    font-size: 13px;
}

.aodq-question-options p {
    margin: 5px 0;
    color: #666;
}

.aodq-question-options p em {
    font-weight: 600;
    color: #333;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .aodq-survey-listing-wrapper,
    .aodq-survey-detail-wrapper {
        padding: 15px;
    }

    .aodq-survey-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .aodq-survey-header h2 {
        font-size: 24px;
    }

    .aodq-survey-items-table {
        font-size: 13px;
    }

    .aodq-survey-items-table thead th,
    .aodq-survey-items-table tbody td {
        padding: 12px 10px;
    }

    .aodq-survey-title strong {
        font-size: 15px;
    }

    .aodq-survey-purpose {
        font-size: 12px;
    }

    .aodq-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .aodq-detail-header {
        padding: 15px;
    }

    .aodq-detail-header h2 {
        font-size: 22px;
    }

    .aodq-detail-grid {
        grid-template-columns: 1fr;
    }

    .aodq-question-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .aodq-question-status {
        align-self: flex-start;
    }

    .aodq-info-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .aodq-info-row label {
        min-width: auto;
        margin-right: 0;
        margin-bottom: 5px;
    }
}

@media (max-width: 480px) {
    .aodq-survey-listing-wrapper,
    .aodq-survey-detail-wrapper {
        padding: 10px;
    }

    .aodq-survey-header h2 {
        font-size: 20px;
    }

    .aodq-survey-items-table {
        font-size: 12px;
    }

    .aodq-survey-items-table thead th,
    .aodq-survey-items-table tbody td {
        padding: 10px 8px;
    }

    .aodq-status-badge {
        padding: 4px 8px;
        font-size: 11px;
    }

    .aodq-pagination {
        gap: 3px;
    }

    .aodq-page-link {
        padding: 6px 10px;
        font-size: 12px;
    }

    .aodq-detail-header {
        padding: 12px;
    }

    .aodq-detail-header h2 {
        font-size: 18px;
    }

    .aodq-detail-section {
        padding: 15px;
    }

    .aodq-detail-section h3 {
        font-size: 16px;
        margin-bottom: 15px;
    }
}
