/* ==============================================
   Base Styles
   ============================================== */
.wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}
/* ==============================================
   Form Styles
   ============================================== */
.cgp-form-section {
    background: #fff;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid #e5e5e5;
    border-radius: 3px;
    box-shadow: 0 1px 1px rgba(0,0,0,0.04);
}

.cgp-form-row {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.cgp-form-row label {
    display: inline-block;
    width: 220px;
    font-weight: 600;
    margin-right: 15px;
}

.cgp-form-row input[type="text"],
.cgp-form-row input[type="email"],
.cgp-form-row input[type="tel"],
.cgp-form-row input[type="date"],
.cgp-form-row input[type="file"],
.cgp-form-row select {
    width: 300px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 3px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.07);
    background-color: #fff;
    color: #32373c;
    transition: border-color 0.15s ease-in-out;
}

.cgp-form-row input:focus,
.cgp-form-row select:focus,
.cgp-form-row textarea:focus {
    border-color: #007cba;
    box-shadow: 0 0 0 1px #007cba;
    outline: 2px solid transparent;
}

.cgp-form-row textarea {
    width: 100%;
    max-width: 600px;
    height: 120px;
    padding: 8px 12px;
}

.cgp-form-row input.error {
    border-color: #d63638;
}

.submit-row {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #eee;
}
/* Certificate Form Table Layout */
.cgp-form-table {
    width: 100%;
    max-width: 800px;
    border-collapse: collapse;
    margin: 20px 0;
}

.cgp-form-table tr {
    border-bottom: 1px solid #f0f0f0;
}

.cgp-form-table tr:last-child {
    border-bottom: none;
}

.cgp-form-table th,
.cgp-form-table td {
    padding: 12px 0;
    vertical-align: top;
    text-align: left;
}

.cgp-form-table th {
    width: 180px;
    font-weight: 600;
    color: #1d2327;
    padding-right: 20px;
}

.cgp-form-table input[type="text"],
.cgp-form-table input[type="email"],
.cgp-form-table input[type="tel"],
.cgp-form-table input[type="date"],
.cgp-form-table select,
.cgp-form-table textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #8c8f94;
    border-radius: 3px;
    background-color: #fff;
    font-size: 14px;
}

.cgp-form-table textarea {
    min-height: 100px;
    resize: vertical;
}

.cgp-form-table input::placeholder,
.cgp-form-table textarea::placeholder {
    color: #9e9e9e;
}

/* File Input Styling */
.cgp-file-input {
    display: flex;
    align-items: center;
}

.cgp-file-input input[type="file"] {
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    z-index: -1;
}

.cgp-file-input label {
    display: inline-block;
    padding: 8px 12px;
    background: #f0f0f0;
    border: 1px solid #8c8f94;
    border-radius: 3px;
    cursor: pointer;
    margin-right: 10px;
}

.cgp-file-input label:hover {
    background: #e5e5e5;
}

.cgp-file-name {
    font-size: 13px;
    color: #646970;
}

/* Submit Button */
.cgp-submit-row {
    margin-top: 25px;
    text-align: center;
}

.cgp-submit-btn {
    background: #2271b1;
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.cgp-submit-btn:hover {
    background: #135e96;
}

/* Responsive Adjustments */
@media (max-width: 782px) {
    .cgp-form-table {
        display: block;
    }
    
    .cgp-form-table tr {
        display: block;
        margin-bottom: 15px;
    }
    
    .cgp-form-table th,
    .cgp-form-table td {
        display: block;
        width: 100%;
        padding: 5px 0;
    }
    
    .cgp-form-table th {
        padding-bottom: 3px;
    }
}
/* ==============================================
   Template Management
   ============================================== */
.cgp-templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.cgp-template-item {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 20px;
    text-align: center;
    transition: all 0.2s ease;
}

.cgp-template-item:hover {
    border-color: #999;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.cgp-template-item img {
    max-width: 100%;
    height: auto;
    margin-bottom: 15px;
    border: 1px solid #eee;
}

/* ==============================================
   Image Upload & Preview
   ============================================== */
#image-preview-container {
    margin-top: 20px;
    padding: 15px;
    background: #f9f9f9;
    border: 1px dashed #ddd;
    border-radius: 3px;
    text-align: center;
}

#image-preview {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 10px;
}

/* ==============================================
   Client List & Tables
   ============================================== */
.wp-list-table {
    margin-top: 20px;
    border-radius: 3px;
    overflow: hidden;
}

.wp-list-table th {
    font-weight: 600;
}

.wp-list-table .button {
    margin-right: 5px;
    margin-bottom: 5px;
}

/* ==============================================
   Verification Page
   ============================================== */
.cgp-verification {
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 3px;
    box-shadow: 0 1px 1px rgba(0,0,0,0.04);
}

.cgp-certificate-details {
    margin: 25px 0;
    padding: 25px;
    background: #f8f9fa;
    border-left: 4px solid #0073aa;
}

.cgp-certificate-details p {
    margin: 12px 0;
    font-size: 16px;
    line-height: 1.5;
}

.cgp-certificate-details strong {
    color: #23282d;
}

/* ==============================================
   Buttons & Actions
   ============================================== */
.button.disabled,
.button[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.button-primary {
    background: #2271b1;
    border-color: #2271b1;
}

.button-primary:hover {
    background: #135e96;
    border-color: #135e96;
}

/* ==============================================
   Responsive Styles
   ============================================== */
@media (max-width: 782px) {
    .cgp-form-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cgp-form-row label {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .cgp-form-row input[type="text"],
    .cgp-form-row input[type="email"],
    .cgp-form-row input[type="tel"],
    .cgp-form-row input[type="date"],
    .cgp-form-row select,
    .cgp-form-row textarea {
        width: 100%;
    }
    
    .cgp-templates-grid {
        grid-template-columns: 1fr;
    }
    
    .wp-list-table .row-actions {
        position: static;
    }
}