/**
 * Plat Map Styles
 * Interactive plat map component styling
 */

/* Container */
#plat-map-container {
    position: relative;
    width: 100%;
    height: 600px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

/* Canvas */
.plat-map-canvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: default;
}

/* Loading State */
.plat-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 18px;
    color: #666;
}

.plat-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 10px;
    border: 3px solid #ddd;
    border-top-color: #333;
    border-radius: 50%;
    animation: plat-spinner 0.8s linear infinite;
}

@keyframes plat-spinner {
    to { transform: rotate(360deg); }
}

/* Error State */
.plat-error {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #d32f2f;
    font-size: 16px;
    padding: 20px;
    text-align: center;
}

/* Legend */
.plat-legend {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    min-width: 150px;
    z-index: 10;
}

.plat-legend h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
}

.legend-item:last-child {
    margin-bottom: 0;
}

.legend-color {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 3px;
    margin-right: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.legend-label {
    color: #555;
}

/* Filters */
.plat-filters {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
}

.plat-filter-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.plat-filter-select:hover {
    border-color: #999;
}

.plat-filter-select:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

/* Zoom Controls */
.plat-zoom-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10;
}

.zoom-btn {
    width: 40px;
    height: 40px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.zoom-btn:hover {
    background: #f5f5f5;
    border-color: #999;
}

.zoom-btn:active {
    transform: scale(0.95);
}

/* Editor Controls */
.plat-editor-controls {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 10;
}

.plat-editor-controls .btn {
    padding: 10px 16px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Modal */
.plat-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.plat-modal-dialog {
    position: relative;
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.plat-modal-header {
    position: sticky;
    top: 0;
    background: white;
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    z-index: 1;
}

.plat-modal-close {
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.plat-modal-close:hover {
    color: #333;
}

.plat-modal-content {
    padding: 20px;
}

.plat-modal-content h2 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 24px;
}

.plat-modal-content h3 {
    margin-top: 20px;
    margin-bottom: 10px;
    color: #555;
    font-size: 18px;
}

.plat-modal-content p {
    margin: 8px 0;
    color: #666;
    line-height: 1.6;
}

.plat-modal-content strong {
    color: #333;
}

/* Lot Status Badge */
.lot-status {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 4px;
    color: white;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    margin-bottom: 15px;
}

/* Lot Inventory Section */
.lot-inventory {
    margin-top: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 6px;
    border-left: 4px solid #2196F3;
}

.lot-inventory h3 {
    margin-top: 0;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    margin-top: 10px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background-color: #2196F3;
    color: white;
}

.btn-primary:hover {
    background-color: #1976D2;
}

.btn-success {
    background-color: #4CAF50;
    color: white;
}

.btn-success:hover {
    background-color: #388E3C;
}

.btn-secondary {
    background-color: #757575;
    color: white;
}

.btn-secondary:hover {
    background-color: #616161;
}

/* Notifications */
.plat-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    background: white;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    max-width: 400px;
    animation: slideInRight 0.3s;
    opacity: 1;
    transition: opacity 0.3s;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.plat-notification-success {
    border-left: 4px solid #4CAF50;
}

.plat-notification-error {
    border-left: 4px solid #F44336;
}

.plat-notification-info {
    border-left: 4px solid #2196F3;
}

/* Form Styles */
.plat-form-group {
    margin-bottom: 20px;
}

.plat-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.plat-form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.plat-form-control:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.plat-form-control.error {
    border-color: #F44336;
}

.plat-form-error {
    color: #F44336;
    font-size: 12px;
    margin-top: 5px;
}

/* Responsive */
@media (max-width: 768px) {
    #plat-map-container {
        height: 400px;
    }

    .plat-legend {
        top: 10px;
        right: 10px;
        padding: 10px;
        min-width: 120px;
        font-size: 12px;
    }

    .plat-legend h4 {
        font-size: 12px;
        margin-bottom: 8px;
    }

    .legend-item {
        margin-bottom: 6px;
        font-size: 11px;
    }

    .legend-color {
        width: 16px;
        height: 16px;
        margin-right: 6px;
    }

    .plat-zoom-controls {
        bottom: 10px;
        right: 10px;
        gap: 6px;
    }

    .zoom-btn {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .plat-modal-dialog {
        margin: 10px;
        max-width: calc(100% - 20px);
    }

    .plat-modal-content h2 {
        font-size: 20px;
    }
}

/* Print Styles */
@media print {
    .plat-legend,
    .plat-filters,
    .plat-zoom-controls,
    .plat-editor-controls {
        display: none;
    }

    #plat-map-container {
        border: none;
        height: auto;
    }
}

