/**
 * MBWS Certification - Public Styles
 *
 * @package MBWS_Certification
 */

/* ================================
   Search Form Styles
   ================================ */

.mbws-search-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.mbws-search-title {
    font-size: 1.8em;
    margin-bottom: 25px;
    color: #333;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

/* Form Container */
.mbws-search-form {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.mbws-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-end;
}

.mbws-form-field {
    flex: 1;
    min-width: 200px;
}

.mbws-form-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #444;
}

.mbws-form-field input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.mbws-form-field input[type="text"]:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.15);
    outline: none;
}

/* Form Actions */
.mbws-form-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.mbws-search-btn {
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: #fff;
    padding: 12px 25px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    line-height: 1;
    height: 2.507em;
}

.mbws-search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 115, 170, 0.3);
}

.mbws-reset-btn {
    color: #666;
    text-decoration: none;
    padding: 12px 15px;
    font-size: 14px;
    transition: color 0.2s ease;
}

.mbws-reset-btn:hover {
    color: #d63638;
}

/* ================================
   Search Results Styles
   ================================ */

.mbws-search-results {
    margin-top: 20px;
}

.mbws-results-count {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.mbws-results-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.mbws-results-table td:first-child,
.mbws-results-table th:first-child {
    padding-left: 15px;
}

.mbws-results-table td:last-child,
.mbws-results-table th:last-child {
    padding-right: 15px;
}

.mbws-results-table th,
.mbws-results-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.mbws-results-table th {
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.mbws-results-table tbody tr:hover {
    background: #f8f9fa;
}

.mbws-results-table tbody tr:last-child td {
    border-bottom: none;
}

.mbws-view-link {
    display: inline-block;
    padding: 6px 12px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    transition: background 0.2s ease;
}

.mbws-view-link:hover {
    background: #005a87;
    color: #fff;
}

.mbws-no-results {
    text-align: center;
    padding: 40px;
    background: #fff;
    border-radius: 8px;
    color: #666;
    font-style: italic;
}

/* ================================
   Single Page Styles
   ================================ */

.mbws-single-wrapper {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
}

.mbws-single-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.mbws-certification-single {
    padding: 40px;
}

.mbws-single-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.mbws-single-title {
    font-size: 2em;
    color: #333;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mbws-single-title::before {
    content: "✓";
    color: white;
    background-color: #28a745;
    border-radius: 99px;
    padding: 2px 6px;
    font-size: 1em;
    font-weight: bold;
    margin-right: 6px;
    width: 1.4em;
    height: 1.4em;
    text-align: center;
}


/* Detail Table */
.mbws-detail-table {
    width: 100%;
    margin-bottom: 30px;
}

.mbws-detail-table td:first-child,
.mbws-detail-table th:first-child {
    padding-left: 15px;
}

.mbws-detail-table td:last-child,
.mbws-detail-table th:last-child {
    padding-right: 15px;
}

.mbws-detail-table th,
.mbws-detail-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.mbws-detail-table th {
    width: 200px;
    font-weight: 600;
    color: #555;
    background: #fafafa;
}

.mbws-detail-table td {
    color: #333;
}

.mbws-detail-table td strong {
    color: #0073aa;
    font-size: 1.1em;
}

/* Attachment Section */
.mbws-attachment-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.mbws-attachment-section h3 {
    font-size: 1.3em;
    color: #333;
    margin-bottom: 20px;
}

.mbws-attachment-image {
    text-align: center;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.mbws-attachment-image img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

/* Footer */
.mbws-single-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.mbws-back-link {
    display: inline-block;
    color: #0073aa;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.mbws-back-link:hover {
    color: #005a87;
}

/* ================================
   Responsive Styles
   ================================ */

@media screen and (max-width: 768px) {
    .mbws-form-row {
        flex-direction: column;
    }

    .mbws-form-field {
        width: 100%;
    }

    .mbws-form-actions {
        width: 100%;
        flex-direction: column;
    }

    .mbws-search-btn,
    .mbws-reset-btn {
        width: 100%;
        text-align: center;
    }

    .mbws-results-table {
        display: block;
        overflow-x: auto;
    }

    .mbws-detail-table th,
    .mbws-detail-table td {
        display: block;
        width: 100%;
    }

    .mbws-detail-table th {
        border-bottom: none;
        padding-bottom: 5px;
    }

    .mbws-detail-table td {
        padding-top: 5px;
    }

    .mbws-certification-single {
        padding: 25px;
    }

    .mbws-single-title {
        font-size: 1.5em;
    }
}