/*
 * CertiAIGen Public Styles
 *
 * @since    1.0.0
 * @package  CertiAIGen
 * @subpackage CertiAIGen/assets/css
 */

.certiaigen-verification-wrapper {
    max-width: 960px;
    margin: 30px auto;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.certiaigen-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.certiaigen-form input[type="text"] {
    width: 100%;
    max-width: 300px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.certiaigen-form button {
    margin-top: 10px;
}

.certiaigen-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    font-weight: bold;
}

.certiaigen-message.error {
    background-color: #fdd;
    border: 1px solid #f99;
    color: #c00;
}

.certiaigen-message.success {
    background-color: #ddf;
    border: 1px solid #99f;
    color: #00c;
}

/* Certificate Preview Area */
.certiaigen-display-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.certiaigen-certificate-preview {
    position: relative; /* Important for absolute positioning of text */
    width: 100%;
    /* Set a responsive aspect ratio, e.g., 16:9 for landscape */
    padding-bottom: 56.25%; /* 9 / 16 * 100 */
    background-color: #f0f0f0;
    overflow: hidden; /* Hide anything outside the certificate bounds */
    border: 1px solid #ccc;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.certiaigen-certificate-preview img.certiaigen-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; /* or 'cover' depending on desired fit */
    z-index: 1;
}

.certiaigen-certificate-field {
    position: absolute;
    z-index: 2; /* Ensure text is above background image */
    white-space: nowrap; /* Prevent text from wrapping by default */
    transform: translate(-50%, -50%); /* Center based on element's own size */
    box-sizing: border-box;
    max-width: 100%; /* Ensure text doesn't overflow container */
}

/* Helper for text alignment */
.certiaigen-field-text-align-left {
    transform: translate(0, -50%); /* Align left */
}
.certiaigen-field-text-align-center {
    transform: translate(-50%, -50%); /* Align center */
}
.certiaigen-field-text-align-right {
    transform: translate(-100%, -50%); /* Align right */
}

.certiaigen-certificate-field.name {
    font-weight: bold;
    /* Font size handled by JS inline styles */
}

.certiaigen-download-area {
    text-align: center;
    margin-top: 20px;
}