/**
 * GPS Location Sender - New Interactive Map Design
 * Responsive CSS for map selection and popup sharing
 */

/* Container */
.gps-location-sender-container {
    max-width: 100%;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Header */
.gps-header {
    text-align: center;
    margin-bottom: 20px;
}

.gps-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #2c3e50;
}

.gps-instruction {
    font-size: 0.95rem;
    color: #666;
    margin: 0;
}

/* Map Container */
.gps-map-container {
    position: relative;
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.gps-interactive-map {
    width: 100%;
    height: 400px;
    background: #f8f9fa;
    position: relative;
}

.gps-map-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #666;
}

.gps-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e3e3e3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: gps-spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes gps-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Location Info */
.gps-location-info {
    background: #fff;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.gps-location-info.active {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.gps-location-details h4 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
}

.gps-coordinates {
    font-size: 0.9rem;
    color: #666;
    margin: 0 0 8px 0;
    font-family: 'Courier New', monospace;
}

.gps-lat-label, .gps-lng-label {
    font-weight: 500;
    color: #555;
}

.gps-address-info {
    margin-top: 8px;
}

.gps-address-text {
    font-size: 0.9rem;
    color: #555;
    margin: 0;
    font-style: italic;
}

/* Share Button */
.gps-share-button {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.gps-share-button:hover {
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.gps-share-icon {
    font-size: 1.2rem;
}

/* Modal */
.gps-share-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.gps-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.gps-modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: gps-modal-appear 0.3s ease-out;
}

@keyframes gps-modal-appear {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.gps-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 0;
    border-bottom: 1px solid #e1e8ed;
    margin-bottom: 24px;
}

.gps-modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
}

.gps-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.gps-modal-close:hover {
    background: #f1f3f4;
    color: #333;
}

.gps-modal-body {
    padding: 0 24px;
}

/* Location Summary */
.gps-location-summary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
}

.gps-location-preview {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gps-preview-icon {
    font-size: 1.5rem;
    color: #e74c3c;
}

.gps-preview-text {
    flex: 1;
}

.gps-preview-coords {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #666;
    margin: 0 0 4px 0;
}

.gps-preview-address {
    font-size: 0.9rem;
    color: #555;
    margin: 0;
    font-style: italic;
}

/* Share Methods */
.gps-share-methods h4 {
    margin: 0 0 16px 0;
    font-size: 1.1rem;
    font-weight: 500;
    color: #2c3e50;
}

.gps-method-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.gps-method-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 12px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.gps-method-option:hover {
    border-color: #3498db;
    background: #f8f9fa;
}

.gps-method-option.selected {
    border-color: #3498db;
    background: #e3f2fd;
}

.gps-method-icon {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.gps-method-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #555;
}

/* Recipient Form */
.gps-recipient-form {
    border-top: 1px solid #e1e8ed;
    padding-top: 20px;
    margin-top: 20px;
}

.gps-form-group {
    margin-bottom: 16px;
}

.gps-form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #555;
    font-size: 0.9rem;
}

.gps-form-input,
.gps-form-textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.gps-form-input:focus,
.gps-form-textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.gps-form-textarea {
    resize: vertical;
    min-height: 80px;
}

/* Modal Footer */
.gps-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 24px;
    border-top: 1px solid #e1e8ed;
    margin-top: 24px;
}

.gps-btn {
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.gps-btn-secondary {
    background: #f1f3f4;
    color: #555;
}

.gps-btn-secondary:hover {
    background: #e8eaed;
}

.gps-btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.gps-btn-primary:hover {
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.gps-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Status Messages */
.gps-status-message {
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 16px;
    font-size: 0.9rem;
    font-weight: 500;
}

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

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

.gps-status-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gps-interactive-map {
        height: 300px;
    }
    
    .gps-location-info {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .gps-share-button {
        width: 100%;
        justify-content: center;
    }
    
    .gps-modal-content {
        margin: 10px;
        max-height: calc(100vh - 20px);
    }
    
    .gps-modal-header,
    .gps-modal-body,
    .gps-modal-footer {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .gps-method-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gps-modal-footer {
        flex-direction: column;
    }
    
    .gps-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .gps-interactive-map {
        height: 250px;
    }
    
    .gps-title {
        font-size: 1.3rem;
    }
    
    .gps-method-grid {
        grid-template-columns: 1fr;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .gps-location-info {
        border-width: 3px;
    }
    
    .gps-method-option {
        border-width: 3px;
    }
    
    .gps-form-input,
    .gps-form-textarea {
        border-width: 3px;
    }
}

