/**
 * עיצוב עמוד החתימה הדיגיטלית
 */

/* איפוס כללי */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* כללי */
body.ag-signature-page {
    font-family: 'Rubik', 'Assistant', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    direction: rtl;
    margin: 0;
    padding: 0;
}

.ag-signature-container {
    max-width: 1000px;
    margin: 0 auto;
    background-color: #fff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* כותרת */
.ag-signature-header {
    background-color: #0a3d62;
    color: #fff;
    padding: 20px;
    text-align: center;
    border-bottom: 5px solid #f39c12;
}

.ag-signature-header h1 {
    font-size: 24px;
    margin: 10px 0;
}

.ag-logo {
    margin-bottom: 15px;
}

.ag-logo-img {
    max-height: 80px;
    width: auto;
}

/* תוכן */
.ag-signature-content {
    padding: 30px;
    flex: 1;
}

.ag-order-details {
    margin-bottom: 40px;
}

.ag-order-details h2 {
    font-size: 22px;
    margin-bottom: 20px;
    color: #0a3d62;
    border-bottom: 2px solid #f39c12;
    padding-bottom: 10px;
}

.ag-order-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.ag-order-card {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.ag-order-card h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #0a3d62;
}

.ag-order-kv {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 10px;
}

.ag-order-kv dt {
    font-weight: bold;
    color: #555;
}

.ag-order-items {
    margin-bottom: 30px;
}

.ag-order-items h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #0a3d62;
}

.ag-order-items table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.ag-order-items table th,
.ag-order-items table td {
    padding: 12px;
    text-align: right;
    border-bottom: 1px solid #ddd;
}

.ag-order-items table th {
    background-color: #f5f5f5;
    font-weight: bold;
    color: #333;
}

.ag-order-items table tfoot td {
    font-weight: bold;
    border-top: 2px solid #ddd;
}

/* אזור החתימה */
.ag-signature-section {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.ag-signature-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #0a3d62;
}

.ag-signature-pad-container {
    margin: 20px 0;
}

.ag-signature-pad {
    width: 100%;
    height: 200px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    touch-action: none;
}

.ag-signature-controls {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
}

/* כפתורים */
.ag-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.ag-btn-primary {
    background-color: #0a3d62;
    color: #fff;
}

.ag-btn-primary:hover {
    background-color: #0c4b78;
}

.ag-btn-secondary {
    background-color: #e0e0e0;
    color: #333;
}

.ag-btn-secondary:hover {
    background-color: #d0d0d0;
}

/* הודעות */
.ag-signature-message {
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.ag-signature-message h3 {
    margin-bottom: 10px;
    font-size: 18px;
}

.ag-success {
    background-color: #e8f5e9;
    border: 1px solid #a5d6a7;
    color: #2e7d32;
}

.ag-error {
    background-color: #ffebee;
    border: 1px solid #ef9a9a;
    color: #c62828;
}

.ag-loading {
    background-color: #e3f2fd;
    border: 1px solid #90caf9;
    color: #1565c0;
}

/* כותרת תחתונה */
.ag-signature-footer {
    background-color: #f5f5f5;
    padding: 15px;
    text-align: center;
    color: #666;
    font-size: 14px;
    border-top: 1px solid #ddd;
}

/* תגובתיות */
@media (max-width: 768px) {
    .ag-signature-header h1 {
        font-size: 20px;
    }
    
    .ag-signature-content {
        padding: 20px 15px;
    }
    
    .ag-order-kv {
        grid-template-columns: 100px 1fr;
    }
    
    .ag-signature-pad {
        height: 150px;
    }
}

@media (max-width: 480px) {
    .ag-signature-controls {
        flex-direction: column;
    }
    
    .ag-btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .ag-order-items table th,
    .ag-order-items table td {
        padding: 8px 5px;
        font-size: 14px;
    }
}
