/* Intigo Shipping Admin Styles */

.intigo-admin-container {
    max-width: 1200px;
}

.intigo-status-card,
.intigo-settings-card,
.intigo-webhook-card {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 15px 0;
}

.status-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.status-item .label {
    font-weight: 600;
    color: #23282d;
}

.status-item .value {
    padding: 5px 10px;
    border-radius: 3px;
    font-weight: 500;
    text-align: center;
}

.status-item .value.production {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-item .value.development {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-item .value.configured {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-item .value.not-configured {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-item .value.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-item .value.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.test-connection-btn {
    margin-top: 10px;
}

.intigo-parcel-info {
    background: #f9f9f9;
    border: 1px solid #ddd;
    padding: 15px;
    margin: 15px 0;
    border-radius: 4px;
}

.intigo-parcel-info h3 {
    margin-top: 0;
    color: #23282d;
}

.intigo-parcel-actions {
    margin-top: 15px;
}

.intigo-parcel-actions .button {
    margin-right: 10px;
}

.intigo-parcel-creation {
    text-align: center;
    padding: 20px;
}

/* Parcel Creation Popup Styles */
.intigo-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    display: none;
}

.intigo-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 1000000;
}

.intigo-popup-header {
    background: #0073aa;
    color: #fff;
    padding: 20px;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.intigo-popup-header h2 {
    margin: 0;
    color: #fff;
    font-size: 20px;
}

.intigo-popup-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.intigo-popup-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.intigo-popup-content {
    padding: 20px;
}

.intigo-field-mapping {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.parcel-options {
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 5px;
}

.parcel-options h3 {
    margin-top: 0;
    color: #333;
}

.field-row {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.field-row label {
    min-width: 120px;
    font-weight: 600;
    margin-right: 10px;
}

.field-row input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.order-details h3,
.shipping-details h3 {
    margin-top: 0;
    color: #0073aa;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.order-details p,
.shipping-details p {
    margin: 8px 0;
    font-size: 14px;
}

.intigo-field-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.intigo-field-group label {
    font-weight: 600;
    color: #23282d;
    font-size: 14px;
}

.intigo-field-group input,
.intigo-field-group select,
.intigo-field-group textarea {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.intigo-field-group textarea {
    resize: vertical;
    min-height: 60px;
}

.intigo-field-group .field-value {
    background: #f9f9f9;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #666;
}

.intigo-popup-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.intigo-popup-actions .button {
    padding: 10px 20px;
    font-size: 14px;
}

.intigo-popup-actions .button-primary {
    background: #0073aa;
    border-color: #0073aa;
    color: #fff;
}

.intigo-popup-actions .button-primary:hover {
    background: #005a87;
    border-color: #005a87;
}

.intigo-popup-actions .button-secondary {
    background: #f7f7f7;
    border-color: #ccc;
    color: #555;
}

.intigo-popup-actions .button-secondary:hover {
    background: #eee;
    border-color: #999;
}

.intigo-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.intigo-loading .spinner {
    float: none;
    margin: 0 auto 10px;
}

.intigo-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.intigo-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* Order page specific styles */
.intigo-parcel-section {
    margin-top: 20px;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.intigo-parcel-section h3 {
    margin-top: 0;
    color: #23282d;
}

.intigo-parcel-section p {
    margin-bottom: 15px;
    color: #666;
}
