/**
 * Frontend styles for Certificate Manager.
 *
 * @package CertificateManager
 * @since 1.0.0
 */

/* Download Form Container */
.cm-download-form-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
    min-height: 300px;
}

.cm-download-container {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 40px;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.cm-download-title {
    text-align: center;
    color: #1d2327;
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 30px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f1;
}

/* Form Elements */
.cm-download-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cm-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cm-label {
    font-size: 14px;
    font-weight: 600;
    color: #3c434a;
}

.cm-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    background: #fff;
    color: #1d2327;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    box-sizing: border-box;
}

.cm-input:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: none;
}

.cm-input::placeholder {
    color: #a7aaad;
}

/* Button */
.cm-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s ease-in-out;
    width: 100%;
    box-sizing: border-box;
}

.cm-button-primary {
    background: #2271b1;
    color: #fff;
}

.cm-button-primary:hover {
    background: #135e96;
}

.cm-button-primary:active {
    background: #0a4b78;
}

.cm-button-primary:disabled {
    background: #a7aaad;
    cursor: not-allowed;
}

/* Spinner */
.cm-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: cm-spin 0.6s linear infinite;
}

@keyframes cm-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Messages */
.cm-message {
    margin-top: 20px;
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
}

.cm-message-success {
    background: #edfaef;
    border: 1px solid #68de7c;
    color: #2c7a2c;
}

.cm-message-error {
    background: #fbeaea;
    border: 1px solid #f1adad;
    color: #a00;
}

/* Responsive */
@media screen and (max-width: 600px) {
    .cm-download-container {
        padding: 25px 20px;
    }

    .cm-download-title {
        font-size: 20px;
    }

    .cm-input {
        padding: 10px 14px;
        font-size: 14px;
    }

    .cm-button {
        padding: 10px 20px;
        font-size: 14px;
    }
}
