/**
 * Card Transfer Gateway - Frontend Styles
 *
 * @package Card_Transfer_Gateway
 */

/* General Wrapper */
.ctg-thankyou-wrapper,
.ctg-upload-page-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: inherit;
    direction: rtl;
}

/* Instructions Section */
.ctg-instructions {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.ctg-instructions h3 {
    margin: 0 0 15px 0;
    font-size: 1.3em;
    font-weight: 600;
}

.ctg-instructions-text {
    line-height: 1.8;
    opacity: 0.95;
}

/* Order Amount */
.ctg-order-amount {
    background: #f8f9fa;
    border: 2px solid #28a745;
    border-radius: 12px;
    padding: 20px 25px;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ctg-amount-label {
    font-size: 1.1em;
    color: #495057;
}

.ctg-amount-value {
    font-size: 1.5em;
    font-weight: 700;
    color: #28a745;
}

/* Cards List */
.ctg-cards-list,
.ctg-cards-section {
    margin-bottom: 30px;
}

.ctg-cards-list h4,
.ctg-cards-section h3 {
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.ctg-cards-hint {
    color: #666;
    margin-bottom: 20px;
}

.ctg-card-item,
.ctg-card-box {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.ctg-card-item:hover,
.ctg-card-box:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.ctg-card-header,
.ctg-card-bank {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #fff;
    padding: 12px 20px;
    font-weight: 600;
    font-size: 1.1em;
}

.ctg-card-body,
.ctg-card-info {
    padding: 20px;
}

.ctg-card-row,
.ctg-info-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #eee;
}

.ctg-card-row:last-child,
.ctg-info-row:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.ctg-card-label,
.ctg-info-label {
    flex: 0 0 120px;
    color: #666;
    font-size: 0.9em;
}

.ctg-card-value,
.ctg-info-value {
    flex: 1;
    font-weight: 600;
    color: #333;
}

.ctg-card-number,
.ctg-card-num {
    font-family: 'Courier New', monospace;
    font-size: 1.15em;
    letter-spacing: 2px;
    color: #1e3c72;
}

/* Copy Button */
.ctg-copy-btn {
    background: #f0f4ff;
    border: 1px solid #667eea;
    color: #667eea;
    padding: 5px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85em;
    margin-right: 10px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.ctg-copy-btn:hover {
    background: #667eea;
    color: #fff;
}

.ctg-copy-btn.copied {
    background: #28a745;
    border-color: #28a745;
    color: #fff;
}

/* Cards Grid */
.ctg-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* Upload Section */
.ctg-upload-section,
.ctg-upload-form-section {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.ctg-upload-section h4,
.ctg-upload-form-section h3 {
    color: #333;
    margin: 0 0 10px 0;
    font-size: 1.2em;
}

.ctg-upload-description {
    color: #666;
    margin-bottom: 20px;
}

/* Form Styles */
.ctg-upload-form {
    margin-top: 20px;
}

.ctg-form-row,
.ctg-form-group {
    margin-bottom: 20px;
}

.ctg-form-row label,
.ctg-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.ctg-form-row label .required,
.ctg-form-group label .required {
    color: #dc3545;
}

.ctg-form-row input[type="text"],
.ctg-form-group input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.2s ease;
}

.ctg-form-row input[type="text"]:focus,
.ctg-form-group input[type="text"]:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
    outline: none;
}

.ctg-field-hint {
    font-size: 0.85em;
    color: #888;
    margin-top: 5px;
}

/* File Upload */
.ctg-file-upload,
.ctg-file-upload-wrapper {
    position: relative;
}

.ctg-file-dropzone {
    border: 2px dashed #ddd;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
    position: relative;
}

.ctg-file-dropzone:hover,
.ctg-file-dropzone.dragover {
    border-color: #667eea;
    background: #f0f4ff;
}

.ctg-file-dropzone input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.ctg-dropzone-content {
    pointer-events: none;
}

.ctg-upload-icon {
    font-size: 3em;
    display: block;
    margin-bottom: 15px;
}

.ctg-file-types {
    font-size: 0.85em;
    color: #888;
    display: block;
    margin-top: 10px;
}

.ctg-file-hint {
    font-size: 0.85em;
    color: #888;
    margin-top: 8px;
}

/* File Preview */
.ctg-file-preview {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 15px;
}

.ctg-preview-image {
    max-width: 80px;
    max-height: 80px;
    border-radius: 6px;
    object-fit: cover;
}

.ctg-file-name {
    flex: 1;
    font-size: 0.9em;
    color: #333;
    word-break: break-all;
}

.ctg-remove-file {
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85em;
}

.ctg-remove-file:hover {
    background: #c82333;
}

/* Submit Button */
.ctg-submit-btn,
.ctg-submit-button {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #fff;
    border: none;
    padding: 15px 40px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.ctg-submit-btn:hover,
.ctg-submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

.ctg-submit-btn:disabled,
.ctg-submit-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.ctg-btn-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ctg-spin 0.8s linear infinite;
}

@keyframes ctg-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Form Messages */
.ctg-form-message,
.ctg-form-messages {
    margin-top: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    display: none;
}

.ctg-form-message.success,
.ctg-form-messages.success {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.ctg-form-message.error,
.ctg-form-messages.error {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Upload Link Section */
.ctg-upload-link-section {
    margin-top: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.ctg-upload-link-section p {
    margin: 0 0 10px 0;
    color: #666;
}

.ctg-upload-link-box {
    display: flex;
    gap: 10px;
}

.ctg-upload-link-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    direction: ltr;
    font-size: 0.9em;
}

.ctg-copy-link-btn {
    background: #667eea;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.ctg-copy-link-btn:hover {
    background: #5a6fd6;
}

/* Order Info Box */
.ctg-order-info-box {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
}

.ctg-order-info-box h3 {
    margin: 0 0 15px 0;
    color: #333;
}

.ctg-order-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ctg-detail-row {
    display: flex;
    align-items: center;
}

.ctg-detail-label {
    flex: 0 0 130px;
    color: #666;
}

.ctg-detail-value {
    font-weight: 600;
    color: #333;
}

.ctg-detail-amount .ctg-detail-value {
    color: #28a745;
    font-size: 1.2em;
}

/* Page Header */
.ctg-page-header {
    text-align: center;
    margin-bottom: 30px;
}

.ctg-page-header h2 {
    color: #333;
    margin-bottom: 15px;
}

.ctg-page-description {
    color: #666;
    line-height: 1.8;
}

/* Error/Success Messages */
.ctg-error {
    background: #f8d7da;
    color: #721c24;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #f5c6cb;
}

.ctg-success {
    background: #d4edda;
    color: #155724;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #c3e6cb;
}

/* Responsive */
@media (max-width: 768px) {
    .ctg-thankyou-wrapper,
    .ctg-upload-page-wrapper {
        padding: 15px;
    }

    .ctg-order-amount {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .ctg-card-row,
    .ctg-info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .ctg-card-label,
    .ctg-info-label {
        flex: none;
    }

    .ctg-upload-link-box {
        flex-direction: column;
    }

    .ctg-cards-grid {
        grid-template-columns: 1fr;
    }
}
.ctg-upload-icon .emoji {
  max-width: 30px !important;
}