/**
 * Public styles for Certificate Generator
 */

/* Certificate Button */
.certificate-generator-container {
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
}

.certificate-button-wrapper {
    margin-bottom: 20px;
}

.certificate-generate-toggle {
    display: inline-block;
    padding: 10px 20px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 16px;
}

.certificate-generate-toggle:hover {
    background: #005b88;
}

/* Courses Dropdown */
.certificate-courses-dropdown {
    margin-top: 15px;
    padding: 15px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 3px;
}

.certificate-courses-list {
    margin-top: 15px;
}

.certificate-course-item {
    margin-bottom: 15px;
    padding: 15px;
    border: 1px solid #e5e5e5;
    border-radius: 3px;
    background: #fff;
}

.certificate-course-item h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 18px;
}

.certificate-course-item.has-certificate {
    border-color: #46b450;
    background: #f7f7f7;
}

.certificate-course-item.cannot-generate {
    border-color: #ddd;
    background: #f9f9f9;
}

.certificate-course-item .certificate-status {
    color: #e27730;
    font-style: italic;
    margin-top: 10px;
    display: block;
    padding: 5px 10px;
    background-color: #fff4e8;
    border-left: 3px solid #e27730;
    border-radius: 3px;
}

.certificate-actions {
    margin-top: 10px;
}

.certificate-actions .button {
    display: inline-block;
    padding: 8px 15px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    margin-right: 10px;
}

.certificate-actions .button:hover {
    background: #005b88;
}

.certificate-message {
    display: inline-block;
    margin-left: 10px;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 13px;
}

.certificate-message.success {
    background: #dff0d8;
    color: #3c763d;
}

.certificate-message.error {
    background: #f2dede;
    color: #a94442;
}

.spinner {
    float: none;
    display: inline-block;
    visibility: hidden;
    margin-left: 5px;
    vertical-align: middle;
}

.spinner.is-active {
    visibility: visible;
}

/* Certificate Grid */
.user-certificates {
    margin-top: 30px;
}

.certificates-grid {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.certificate-card {
    flex: 0 0 calc(33.333% - 20px);
    margin: 10px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 3px;
    overflow: hidden;
}

.certificate-card-inner {
    padding: 15px;
}

.certificate-card h5 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 16px;
    color: #333;
}

.certificate-date, .certificate-expiry {
    font-size: 13px;
    color: #666;
    margin: 5px 0;
}

.certificate-expiry.expired {
    color: #d54e21;
}

.certificate-requirements {
    font-size: 14px;
    color: #666;
}

.certificate-requirements ul {
    margin-top: 5px;
    padding-left: 20px;
}

.certificate-generated.success {
    padding: 10px;
    background: #dff0d8;
    border: 1px solid #d6e9c6;
    border-radius: 3px;
    color: #3c763d;
    margin-top: 10px;
}

/* Responsive Styles */
@media screen and (max-width: 782px) {
    .certificate-card {
        flex: 0 0 calc(50% - 20px);
    }
}

@media screen and (max-width: 600px) {
    .certificate-card {
        flex: 0 0 100%;
    }
}
