/* Create Map Page Specific Styles */

/* Map creation specific styles */
.create-map-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.create-map-header {
    text-align: center;
    margin-bottom: 30px;
}

.create-map-form {
    background: #f8f9fa;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
}

.alliances-section {
    margin: 20px 0;
}

.alliance-row {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.alliance-row.form-group {
    margin-bottom: 20px;
}

/* Ensure form-group styling doesn't conflict with alliance-row */
.alliance-row.form-group label {
    display: none; /* Hide label since alliance rows don't need individual labels */
}

.alliance-name {
    flex: 1;
    min-width: 250px;
}

.alliance-name input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.2s ease;
    background: #f8f9fa;
}

.alliance-name input:focus {
    outline: none;
    border-color: #007bff;
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.alliance-name input::placeholder {
    color: #adb5bd;
    font-style: italic;
}

.color-picker {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    max-width: 320px;
    align-items: center;
}

.color-swatch {
    width: 28px;
    height: 28px;
    border: 3px solid transparent;
    transition: all 0.2s ease;
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.color-swatch:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.color-swatch.selected {
    border-color: #333;
    transform: scale(1.15);
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.3);
}

.color-swatch.selected::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.remove-alliance-btn {
    width: 32px;
    height: 32px;
    font-size: 16px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.2);
    flex-shrink: 0;
}

.remove-alliance-btn:hover {
    background: #c82333;
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.add-alliance-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 10px;
}

.add-alliance-btn:hover {
    background: #218838;
    transform: translateY(-1px);
}

.submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 20px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

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

.modal.show {
    display: block;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.close-btn:hover {
    color: #333;
}

.success-content {
    padding: 20px;
}

.link-group {
    margin-bottom: 20px;
}

.link-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.link-input-group {
    display: flex;
    gap: 10px;
}

.link-input-group input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #f8f9fa;
}

.copy-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    white-space: nowrap;
}

.copy-btn:hover {
    background: #5a6268;
}

/*.alliance-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
    margin-bottom: 10px;
}*/

#alliances-list > div {
    margin-bottom: 30px;
}

.alliance-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.alliance-color-display {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid #ddd;
}

.alliance-links {
    width: 100%;
}

.edit-link-group,
.token-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.edit-link-group label,
.token-group label {
    font-size: 12px;
    font-weight: bold;
    color: #666;
}

.warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .alliance-row {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }
    
    .alliance-name {
        min-width: auto;
    }
    
    .color-picker {
        max-width: 100%;
        justify-content: center;
    }
    
    .create-map-form {
        padding: 25px;
    }
    
    .create-map-container {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .alliance-row {
        padding: 15px;
    }
    
    .color-swatch {
        width: 24px;
        height: 24px;
    }
    
    .remove-alliance-btn {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
}
