/**
 * TLS Proofing Frontend Styles
 */

/* Order Proofs Section */
.tls-order-proofs-section {
    margin: 30px 0;
}

.tls-order-proofs-section h2 {
    margin: 0 0 20px;
    font-size: 1.5em;
    font-weight: 600;
    color: #333;
}

.tls-proofs-pending-notice {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    border-left: 4px solid #ff9800;
    border-radius: 4px;
    padding: 16px 20px;
    margin-bottom: 24px;
}

.tls-proofs-pending-notice p {
    margin: 0;
    color: #5d4037;
    font-size: 14px;
    line-height: 1.5;
}

.tls-proofs-pending-notice strong {
    color: #e65100;
}

.tls-order-proofs-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Proof Item Card */
.tls-order-proof-item {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.tls-order-proof-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.tls-order-proof-item.tls-proof-pending {
    border-top: 3px solid #2196f3;
}

.tls-order-proof-item.tls-proof-approved {
    border-top: 3px solid #4caf50;
}

.tls-order-proof-item.tls-proof-rejected {
    border-top: 3px solid #f44336;
}

/* Header */
.tls-order-proof-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #fafafa;
    border-bottom: 1px solid #eee;
}

.tls-order-proof-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.tls-proof-status {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tls-status-pending {
    background: #e3f2fd;
    color: #1565c0;
}

.tls-status-approved {
    background: #e8f5e9;
    color: #2e7d32;
}

.tls-status-rejected {
    background: #ffebee;
    color: #c62828;
}

/* Content */
.tls-order-proof-content {
    display: flex;
    gap: 24px;
    padding: 20px;
}

.tls-order-proof-preview {
    flex-shrink: 0;
    width: 280px;
}

.tls-order-proof-preview .tls-preview-link {
    display: block;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
}

.tls-order-proof-preview img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.tls-order-proof-preview .tls-preview-link:hover img {
    transform: scale(1.02);
}

.tls-proof-placeholder {
    width: 100%;
    height: 200px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.tls-proof-placeholder .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #bbb;
}

/* Details */
.tls-order-proof-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.tls-proof-specs {
    margin: 0 0 8px;
    color: #666;
    font-size: 14px;
}

.tls-proof-version {
    margin: 0 0 16px;
    color: #999;
    font-size: 13px;
}

.tls-admin-message {
    background: #e8f4fd;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.tls-admin-message strong {
    display: block;
    margin-bottom: 6px;
    color: #1565c0;
    font-size: 13px;
}

.tls-admin-message p {
    margin: 0;
    color: #37474f;
    font-size: 14px;
    line-height: 1.5;
}

.tls-download-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #1976d2;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-top: auto;
    padding: 8px 0;
}

.tls-download-link:hover {
    color: #1565c0;
    text-decoration: underline;
}

.tls-download-link .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Actions */
.tls-order-proof-actions {
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
}

.tls-approve-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
}

.tls-approve-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    accent-color: #4caf50;
    cursor: pointer;
}

.tls-approve-checkbox span {
    flex: 1;
    line-height: 1.4;
}

.tls-action-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Custom Buttons */
.tls-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.tls-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.tls-btn-approve {
    background: linear-gradient(135deg, #4caf50 0%, #43a047 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(76,175,80,0.3);
}

.tls-btn-approve:hover:not(:disabled) {
    background: linear-gradient(135deg, #43a047 0%, #388e3c 100%);
    box-shadow: 0 4px 12px rgba(76,175,80,0.4);
    transform: translateY(-1px);
}

.tls-btn-approve:disabled {
    background: #ccc;
    color: #888;
    box-shadow: none;
    cursor: not-allowed;
}

.tls-btn-reject {
    background: #fff;
    color: #f44336;
    border: 2px solid #f44336;
}

.tls-btn-reject:hover {
    background: #ffebee;
}

.tls-btn-cancel {
    background: #fff;
    color: #666;
    border: 1px solid #ddd;
}

.tls-btn-cancel:hover {
    background: #f5f5f5;
}

.tls-btn-submit {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(255,152,0,0.3);
}

.tls-btn-submit:hover:not(:disabled) {
    background: linear-gradient(135deg, #f57c00 0%, #ef6c00 100%);
}

.tls-btn-submit:disabled {
    background: #ccc;
    color: #888;
    box-shadow: none;
    cursor: not-allowed;
}

/* Reject Form */
.tls-reject-form {
    display: none;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #ddd;
}

.tls-reject-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.2s;
}

.tls-reject-form textarea:focus {
    outline: none;
    border-color: #f44336;
    box-shadow: 0 0 0 3px rgba(244,67,54,0.1);
}

.tls-reject-form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 12px;
}

/* Messages */
.tls-message-container {
    margin-top: 16px;
}

.tls-msg {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
}

.tls-msg-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.tls-msg-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

/* Status Bars */
.tls-order-proof-status-bar {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    font-size: 14px;
}

.tls-order-proof-status-bar.tls-status-approved {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #2e7d32;
}

.tls-order-proof-status-bar.tls-status-rejected {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    color: #5d4037;
}

.tls-order-proof-status-bar .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.tls-order-proof-status-bar.tls-status-approved .dashicons {
    color: #4caf50;
}

.tls-order-proof-status-bar.tls-status-rejected .dashicons {
    color: #ff9800;
}

.tls-feedback-text {
    margin: 8px 0;
    padding: 10px 12px;
    background: rgba(255,255,255,0.7);
    border-radius: 6px;
    font-size: 13px;
}

.tls-pending-revision {
    margin: 8px 0 0;
    font-style: italic;
    font-size: 13px;
    color: #666;
}

/* Spinner Animation */
@keyframes tls-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.tls-spin {
    animation: tls-spin 1s linear infinite;
}

/* Responsive */
@media (max-width: 768px) {
    .tls-order-proof-content {
        flex-direction: column;
    }

    .tls-order-proof-preview {
        width: 100%;
    }

    .tls-order-proof-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .tls-action-buttons {
        flex-direction: column;
    }

    .tls-btn {
        width: 100%;
    }

    .tls-reject-form-actions {
        flex-direction: column;
    }
}
