/**
 * External Link Modal - Exact Figma Design Implementation
 * Matches the client's provided Figma specifications precisely
 */

/* Modal Overlay */
.external-link-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(19, 26, 20, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.external-link-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Modal Container - Exact Figma Specs: 702x323px */
.external-link-modal {
    width: 702px;
    height: 323px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.4);
    border-radius: 18px;
    box-shadow: 0 25px 50px rgba(19, 26, 20, 0.25);
    padding: 0;
    transform: translateY(30px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    font-family: 'PPNeueMontreal', sans-serif;
}

.external-link-overlay.show .external-link-modal {
    transform: translateY(0) scale(1);
}

/* Modal Content Container */
.modal-content {
    padding: 47px 44px 44px 44px; /* Based on Figma positioning */
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

/* Message Text - Figma specs: position 47,84, size 523x38 */
.modal-message {
    font-family: 'PPNeueMontreal', sans-serif;
    font-weight: 400; /* Book weight from Figma */
    font-size: 20px;
    line-height: 24px;
    color: #131a14;
    margin: 0 0 25px 0; /* Calculated from Figma positions */
    width: 523px;
}

/* URL Container */
.modal-url-container {
    margin-bottom: 49px; /* Calculated from Figma layout */
}

/* URL Box - Figma specs: 492x42px */
.modal-url {
    width: 492px;
    height: 42px;
    border: 1px solid #dcdcdc; /* rgb(220,220,220) from Figma */
    border-radius: 8px;
    padding: 14px 20px; /* To center text vertically and horizontally */
    box-sizing: border-box;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-url:hover {
    border-color: #131a14;
    background-color: rgba(19, 26, 20, 0.02);
}

.modal-url .url-text {
    font-family: 'PPNeueMontreal', sans-serif;
    font-weight: 400; /* Book weight from Figma */
    font-size: 20px;
    line-height: 24px;
    color: #000000;
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.modal-url .copy-indicator {
    font-family: 'PPNeueMontreal', sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: #131a14;
    opacity: 0;
    transition: opacity 0.2s ease;
    margin-left: 12px;
    flex-shrink: 0;
}

.modal-url:hover .copy-indicator {
    opacity: 1;
}

/* Modal Buttons Container */
.modal-buttons {
    display: flex;
    gap: 12px; /* Gap between buttons */
    justify-content: flex-start;
}

/* Buttons - Figma specs: 240x61.728px (rounded to 62px) */
.modal-btn {
    width: 240px;
    height: 62px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    box-sizing: border-box;
    font-family: 'PPNeueMontreal', sans-serif;
    font-weight: 500; /* Medium weight from Figma */
    font-size: 20px;
    line-height: 22px;
    transition: opacity 0.3s ease, background-color 0.3s ease;
    text-decoration: none;
    align-items: end;
}

.modal-btn span {
    flex: 1;
    text-align: left;
}

.modal-btn svg {
    width: 13.7px;
    height: 13.7px;
    position: absolute;
    right: 12px;
    top: 12px;
}

/* Cancel Button - Dark background, white text (from Figma) */
.modal-btn-cancel {
    background-color: #131a14;
    color: #ffffff;
}

.modal-btn-cancel:hover {
    opacity: 0.85;
}

.modal-btn-cancel svg path {
    fill: #ffffff;
}

/* Continue Button - Transparent background with border (from Figma) */
.modal-btn-continue {
    background-color: transparent;
    color: #131a14;
    border: 1px solid #131a14;
}

.modal-btn-continue:hover {
    background-color: #f5f5f5;
}

.modal-btn-continue svg path {
    fill: #131a14;
}

.modal-btn:focus {
    outline: 2px solid rgba(19, 26, 20, 0.3);
    outline-offset: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .external-link-modal {
        width: calc(100% - 40px);
        max-width: 600px;
        height: auto;
        min-height: 280px;
    }
    
    .modal-content {
        padding: 24px;
    }
    
    .modal-message {
        width: 100%;
        font-size: 18px;
        line-height: 22px;
    }
    
    .modal-url {
        width: 100%;
    }
    
    .modal-buttons {
        flex-direction: column-reverse;
        gap: 8px;
    }
    
    .modal-btn {
        width: 100%;
    }
}