/* Modal Overlay */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

/* Deploy Modal */
.deploy-modal {
    position: relative;
    width: 100%;
    max-width: 28rem;
    background: var(--slate-900);
    border: 1px solid var(--slate-800);
    border-radius: 1rem;
    padding: 1.5rem;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 0.375rem;
    color: var(--slate-400);
    cursor: pointer;
    transition: all 0.3s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.modal-close .icon {
    width: 1.125rem;
    height: 1.125rem;
    stroke: currentColor;
    stroke-width: 2;
}

.modal-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
}

.modal-subtitle {
    font-size: 0.9375rem;
    color: var(--slate-400);
    margin-top: -0.75rem;
}

/* Deploy Form */
.deploy-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--slate-300);
}

.subdomain-input-group {
    display: flex;
    width: 100%;
}

.subdomain-input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: var(--slate-800);
    border: 1px solid var(--slate-700);
    border-radius: 0.5rem 0 0 0.5rem;
    color: white;
    font-size: 0.9375rem;
    outline: none;
    transition: border-color 0.3s;
}

.subdomain-input:focus {
    border-color: var(--blue-500);
}

.subdomain-suffix {
    display: flex;
    align-items: center;
    padding: 0 1rem;
    background: var(--slate-900);
    border: 1px solid var(--slate-700);
    border-left: none;
    border-radius: 0 0.5rem 0.5rem 0;
    color: var(--slate-500);
    font-size: 0.9375rem;
}

/* Availability Indicator */
.availability-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--slate-400);
}

.status-icon {
    width: 1.125rem;
    height: 1.125rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-icon .icon-sm {
    width: 100%;
    height: 100%;
    stroke-width: 2.5;
}

.status-icon.available {
    color: var(--green-400);
}

.status-icon.available .icon-sm {
    stroke: currentColor;
}

.status-icon.taken {
    color: var(--red-400);
}

.status-icon.taken .icon-sm {
    stroke: currentColor;
}

.status-available {
    color: var(--green-400);
}

.status-taken {
    color: var(--red-400);
}

/* Upgrade Prompt */
.upgrade-prompt {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--slate-800);
    border: 1px solid var(--slate-700);
    border-radius: 0.75rem;
}

.upgrade-icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    color: #FBBF24;
}

.upgrade-icon .icon {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    stroke-width: 2;
}

.upgrade-text {
    flex: 1;
    font-size: 0.875rem;
    color: var(--slate-300);
}

.upgrade-link {
    font-size: 0.875rem;
    color: var(--blue-400);
    text-decoration: underline;
    cursor: pointer;
}

.upgrade-link:hover {
    color: var(--blue-300);
}

/* Deploy Button */
.btn-deploy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem;
    background: var(--blue-500);
    border: none;
    border-radius: 0.75rem;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-deploy:hover:not(:disabled) {
    background: var(--blue-600);
}

.btn-deploy:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-deploy .icon {
    width: 1.125rem;
    height: 1.125rem;
    stroke: currentColor;
    stroke-width: 2;
}

/* Deploying State */
.modal-content.deploying {
    align-items: center;
    text-align: center;
    padding: 1rem 0;
}

.deploying-icon {
    width: 4rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 50%;
    color: var(--blue-500);
}

.deploying-icon .icon {
    width: 2rem;
    height: 2rem;
    stroke: currentColor;
    stroke-width: 2;
}

.deploy-steps {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    text-align: left;
}

.deploy-step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9375rem;
}

.deploy-step.pending {
    color: var(--slate-500);
}

.deploy-step.current {
    color: var(--blue-400);
}

.deploy-step.completed {
    color: var(--green-400);
}

.step-icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-icon.empty {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid currentColor;
    border-radius: 50%;
}

.step-icon .icon,
.step-icon .icon-sm {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    stroke-width: 2.5;
}

.deploy-progress-bar {
    width: 100%;
    height: 0.375rem;
    background: var(--slate-800);
    border-radius: 9999px;
    overflow: hidden;
    margin-top: 1rem;
}

.deploy-progress-fill {
    height: 100%;
    background: var(--blue-500);
    border-radius: 9999px;
}

/* Success State */
.modal-content.success {
    align-items: center;
    text-align: center;
}

.success-icon {
    width: 4rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 185, 129, 0.2);
    border-radius: 50%;
    color: var(--green-500);
}

.success-icon .icon {
    width: 2rem;
    height: 2rem;
    stroke: currentColor;
    stroke-width: 2.5;
}

.url-display {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--slate-800);
    border-radius: 0.75rem;
}

.url-text {
    flex: 1;
    color: var(--blue-400);
    font-weight: 500;
    font-size: 0.9375rem;
    word-break: break-all;
}

.copy-btn-container {
    position: relative;
}

.copy-btn {
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--slate-700);
    border: none;
    border-radius: 0.5rem;
    color: var(--slate-300);
    cursor: pointer;
    transition: all 0.3s;
}

.copy-btn:hover {
    background: var(--slate-600);
    color: white;
}

.copy-btn .icon-sm {
    width: 1rem;
    height: 1rem;
    stroke: currentColor;
    stroke-width: 2;
}

.copy-tooltip {
    position: absolute;
    top: -2rem;
    right: 0;
    padding: 0.375rem 0.75rem;
    background: var(--slate-800);
    border: 1px solid var(--slate-700);
    border-radius: 0.375rem;
    color: white;
    font-size: 0.75rem;
    white-space: nowrap;
}

.success-actions {
    display: flex;
    gap: 0.75rem;
    width: 100%;
}

.btn-visit,
.btn-back {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem;
    border: none;
    border-radius: 0.75rem;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-visit {
    background: var(--blue-500);
    color: white;
}

.btn-visit:hover {
    background: var(--blue-600);
}

.btn-back {
    background: var(--slate-800);
    color: var(--slate-300);
}

.btn-back:hover {
    background: var(--slate-700);
    color: white;
}

.btn-visit .icon-sm,
.btn-back .icon-sm {
    width: 1rem;
    height: 1rem;
    stroke: currentColor;
    stroke-width: 2;
}

/* Responsive */
@media (max-width: 640px) {
    .deploy-modal {
        max-width: 100%;
        margin: 0;
    }

    .success-actions {
        flex-direction: column;
    }
}
